fix telemetry issues
This commit is contained in:
1 parent
5a285ab1a6
commit
4d64be9996
4 files changed
+19
-4
No files matched your search
@@ -23,6 +23,14 @@ class TelemetrySigningTests(unittest.TestCase):
|
||||
self.assertEqual(len(expected), 64)
|
||||
self.assertEqual(expected, expected.lower())
|
||||
|
||||
def test_platform_data_marks_docker_runtime(self):
|
||||
with patch.object(telemetry.os.path, "exists", side_effect=lambda path: path == "/.dockerenv"):
|
||||
self.assertEqual(telemetry._platform_data()["runtime"], "CPython (Docker)")
|
||||
|
||||
def test_platform_data_keeps_python_runtime_outside_docker(self):
|
||||
with patch.object(telemetry.os.path, "exists", return_value=False):
|
||||
self.assertEqual(telemetry._platform_data()["runtime"], "CPython")
|
||||
|
||||
|
||||
class FakeResponse:
|
||||
status = 201
|
||||
|
||||
Reference in new issue
Block a user