Hello community, here is the log from the commit of package python-applicationinsights for openSUSE:Factory checked in at 2019-05-14 13:30:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-applicationinsights (Old) and /work/SRC/openSUSE:Factory/.python-applicationinsights.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-applicationinsights" Tue May 14 13:30:33 2019 rev:4 rq:694365 version:0.11.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-applicationinsights/python-applicationinsights.changes 2018-09-26 16:12:26.463384624 +0200 +++ /work/SRC/openSUSE:Factory/.python-applicationinsights.new.5148/python-applicationinsights.changes 2019-05-14 13:30:35.767375003 +0200 @@ -1,0 +2,12 @@ +Wed Apr 10 14:54:02 UTC 2019 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 0.11.7 + + For detailed information about changes see the + CHANGELOG.md file provided with this package +- Remove python-devel package from BuildRequires +- Run fdupes to hardlink duplicate files + + Add fdupes to BuildRequires + + Add %fdupes invocation to %install + +------------------------------------------------------------------- Old: ---- applicationinsights-0.11.6.tar.gz New: ---- applicationinsights-0.11.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-applicationinsights.spec ++++++ --- /var/tmp/diff_new_pack.iurAxS/_old 2019-05-14 13:30:36.619377021 +0200 +++ /var/tmp/diff_new_pack.iurAxS/_new 2019-05-14 13:30:36.619377021 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-applicationinsights # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,21 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-applicationinsights -Version: 0.11.6 +Version: 0.11.7 Release: 0 Summary: Microsoft Application Insights for Python License: MIT Group: Development/Languages/Python Url: https://github.com/Azure/azure-sdk-for-python Source: https://files.pythonhosted.org/packages/source/a/applicationinsights/applicationinsights-%{version}.tar.gz -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip Conflicts: python-azure-sdk <= 2.0.0 @@ -52,6 +52,7 @@ %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %files %{python_files} %defattr(-,root,root,-) ++++++ applicationinsights-0.11.6.tar.gz -> applicationinsights-0.11.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/CHANGELOG.md new/applicationinsights-0.11.7/CHANGELOG.md --- old/applicationinsights-0.11.6/CHANGELOG.md 2018-08-09 23:41:17.000000000 +0200 +++ new/applicationinsights-0.11.7/CHANGELOG.md 2018-09-23 07:01:06.000000000 +0200 @@ -1,5 +1,10 @@ # Changelog +## 0.11.7 + +- Added `track_dependency`. +- Added optional `request_id` argument to `track_request`. + ## 0.11.6 - Fixed exception logging in Flask integration on Python 2. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/PKG-INFO new/applicationinsights-0.11.7/PKG-INFO --- old/applicationinsights-0.11.6/PKG-INFO 2018-08-09 23:44:00.000000000 +0200 +++ new/applicationinsights-0.11.7/PKG-INFO 2018-09-23 07:02:17.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: applicationinsights -Version: 0.11.6 +Version: 0.11.7 Summary: This project extends the Application Insights API surface to support Python. Home-page: https://github.com/Microsoft/ApplicationInsights-Python Author: Microsoft diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/applicationinsights/TelemetryClient.py new/applicationinsights-0.11.7/applicationinsights/TelemetryClient.py --- old/applicationinsights-0.11.6/applicationinsights/TelemetryClient.py 2018-07-02 23:08:46.000000000 +0200 +++ new/applicationinsights-0.11.7/applicationinsights/TelemetryClient.py 2018-09-23 07:01:06.000000000 +0200 @@ -2,10 +2,12 @@ import traceback import sys import uuid + from applicationinsights import channel NULL_CONSTANT_STRING = 'Null' + class TelemetryClient(object): """The telemetry client used for sending all types of telemetry. It serves as the main entry point for interacting with the Application Insights service. @@ -160,7 +162,7 @@ dataPoint.min = min dataPoint.max = max dataPoint.std_dev = std_dev - + data = channel.contracts.MetricData() data.metrics.append(dataPoint) if properties: @@ -185,7 +187,7 @@ self._channel.write(data, self._context) - def track_request(self, name, url, success, start_time=None, duration=None, response_code=None, http_method=None, properties=None, measurements=None): + def track_request(self, name, url, success, start_time=None, duration=None, response_code=None, http_method=None, properties=None, measurements=None, request_id=None): """Sends a single request that was captured for the application. Args: @@ -194,35 +196,70 @@ success (bool). true if the request ended in success, false otherwise.\n start_time (str). the start time of the request. The value should look the same as the one returned by :func:`datetime.isoformat()` (defaults to: None)\n duration (int). the number of milliseconds that this request lasted. (defaults to: None)\n - response_code (string). the response code that this request returned. (defaults to: None)\n - http_method (string). the HTTP method that triggered this request. (defaults to: None)\n + response_code (str). the response code that this request returned. (defaults to: None)\n + http_method (str). the HTTP method that triggered this request. (defaults to: None)\n properties (dict). the set of custom properties the client wants attached to this data item. (defaults to: None)\n - measurements (dict). the set of custom measurements the client wants to attach to this data item. (defaults to: None) + measurements (dict). the set of custom measurements the client wants to attach to this data item. (defaults to: None)\n + request_id (str). the id for this request. If None, a new uuid will be generated. (defaults to: None) """ data = channel.contracts.RequestData() - data.id = str(uuid.uuid4()) + data.id = request_id or str(uuid.uuid4()) data.name = name + data.url = url + data.success = success data.start_time = start_time or datetime.datetime.utcnow().isoformat() + 'Z' + data.duration = self.__ms_to_duration(duration) + data.response_code = str(response_code) or '200' + data.http_method = http_method or 'GET' + if properties: + data.properties = properties + if measurements: + data.measurements = measurements + + self.channel.write(data, self._context) + + def track_dependency(self, name, data, type=None, target=None, duration=None, success=None, result_code=None, properties=None, measurements=None, dependency_id=None): + """Sends a single dependency telemetry that was captured for the application. - local_duration = duration or 0 + Args: + name (str). the name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.\n + data (str). the command initiated by this dependency call. Examples are SQL statement and HTTP URL with all query parameters.\n + type (str). the dependency type name. Low cardinality value for logical grouping of dependencies and interpretation of other fields like commandName and resultCode. Examples are SQL, Azure table, and HTTP. (default to: None)\n + target (str). the target site of a dependency call. Examples are server name, host address. (default to: None)\n + duration (int). the number of milliseconds that this dependency call lasted. (defaults to: None)\n + success (bool). true if the dependency call ended in success, false otherwise. (defaults to: None)\n + result_code (str). the result code of a dependency call. Examples are SQL error code and HTTP status code. (defaults to: None)\n + properties (dict). the set of custom properties the client wants attached to this data item. (defaults to: None)\n + measurements (dict). the set of custom measurements the client wants to attach to this data item. (defaults to: None)\n + id (str). the id for this dependency call. If None, a new uuid will be generated. (defaults to: None) + """ + dependency_data = channel.contracts.RemoteDependencyData() + dependency_data.id = dependency_id or str(uuid.uuid4()) + dependency_data.name = name + dependency_data.data = data + dependency_data.type = type + dependency_data.target = target + dependency_data.duration = self.__ms_to_duration(duration) + dependency_data.success = success + dependency_data.result_code = str(result_code) or '200' + if properties: + dependency_data.properties = properties + if measurements: + dependency_data.measurements = measurements + + self.channel.write(dependency_data, self._context) + + @staticmethod + def __ms_to_duration(duration_ms): + local_duration = duration_ms or 0 duration_parts = [] for multiplier in [1000, 60, 60, 24]: duration_parts.append(local_duration % multiplier) local_duration //= multiplier duration_parts.reverse() - data.duration = '%02d:%02d:%02d.%03d' % tuple(duration_parts) + duration = '%02d:%02d:%02d.%03d' % (duration_parts[0], duration_parts[1], duration_parts[2], duration_parts[3]) if local_duration: - data.duration = '%d.%s' % (local_duration, data.duration) - - data.response_code = response_code or '200' - data.success = success - data.http_method = http_method or 'GET' - data.url = url - if properties: - data.properties = properties - if measurements: - data.measurements = measurements - - self.channel.write(data, self._context) + duration = '%d.%s' % (local_duration, duration) + return duration diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/applicationinsights/channel/TelemetryChannel.py new/applicationinsights-0.11.7/applicationinsights/channel/TelemetryChannel.py --- old/applicationinsights-0.11.6/applicationinsights/channel/TelemetryChannel.py 2018-08-09 23:41:17.000000000 +0200 +++ new/applicationinsights-0.11.7/applicationinsights/channel/TelemetryChannel.py 2018-09-23 07:01:06.000000000 +0200 @@ -12,7 +12,7 @@ # set up internal context internal_context = contracts.Internal() -internal_context.sdk_version = platform_moniker + ':0.11.6' +internal_context.sdk_version = platform_moniker + ':0.11.7' class TelemetryChannel(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/applicationinsights.egg-info/PKG-INFO new/applicationinsights-0.11.7/applicationinsights.egg-info/PKG-INFO --- old/applicationinsights-0.11.6/applicationinsights.egg-info/PKG-INFO 2018-08-09 23:44:00.000000000 +0200 +++ new/applicationinsights-0.11.7/applicationinsights.egg-info/PKG-INFO 2018-09-23 07:02:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: applicationinsights -Version: 0.11.6 +Version: 0.11.7 Summary: This project extends the Application Insights API surface to support Python. Home-page: https://github.com/Microsoft/ApplicationInsights-Python Author: Microsoft diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/setup.py new/applicationinsights-0.11.7/setup.py --- old/applicationinsights-0.11.6/setup.py 2018-08-09 23:41:17.000000000 +0200 +++ new/applicationinsights-0.11.7/setup.py 2018-09-23 07:01:06.000000000 +0200 @@ -14,7 +14,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # http://packaging.python.org/en/latest/tutorial.html#version - version='0.11.6', + version='0.11.7', description='This project extends the Application Insights API surface to support Python.', long_description=long_description, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applicationinsights-0.11.6/tests/applicationinsights_tests/TestTelemetryClient.py new/applicationinsights-0.11.7/tests/applicationinsights_tests/TestTelemetryClient.py --- old/applicationinsights-0.11.6/tests/applicationinsights_tests/TestTelemetryClient.py 2018-08-09 23:41:17.000000000 +0200 +++ new/applicationinsights-0.11.7/tests/applicationinsights_tests/TestTelemetryClient.py 2018-09-23 07:01:06.000000000 +0200 @@ -15,6 +15,7 @@ from applicationinsights import TelemetryClient, channel + class TestTelemetryClient(unittest.TestCase): def test_constructor_throws_with_no_instrumentation_key(self): self.assertRaises(Exception, TelemetryClient, None) @@ -51,7 +52,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -70,7 +71,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -79,7 +80,7 @@ key = '99999999-9999-9999-9999-999999999999' sender = MockTelemetrySender() queue = channel.SynchronousQueue(sender) - + chan = channel.TelemetryChannel(queue=queue) chan.context.properties['foo'] = 'bar' @@ -98,7 +99,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) expected = '{"ver": 1, "name": "Microsoft.ApplicationInsights.Event", "time": "TIME_PLACEHOLDER", "sampleRate": 100.0, "iKey": "99999999-9999-9999-9999-999999999999", "tags": {"ai.device.id": "DEVICE_ID_PLACEHOLDER", "ai.device.locale": "DEVICE_LOCALE_PLACEHOLDER", "ai.device.osVersion": "DEVICE_OS_VERSION_PLACEHOLDER", "ai.device.type": "DEVICE_TYPE_PLACEHOLDER", "ai.internal.sdkVersion": "SDK_VERSION_PLACEHOLDER"}, "data": {"baseType": "EventData", "baseData": {"ver": 2, "name": "test 1", "properties": {"foo": "bar", "x": 42}}}}' self.maxDiff = None @@ -111,7 +112,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) expected = '{"ver": 1, "name": "Microsoft.ApplicationInsights.Event", "time": "TIME_PLACEHOLDER", "sampleRate": 100.0, "iKey": "99999999-9999-9999-9999-999999999999", "tags": {"ai.device.id": "DEVICE_ID_PLACEHOLDER", "ai.device.locale": "DEVICE_LOCALE_PLACEHOLDER", "ai.device.osVersion": "DEVICE_OS_VERSION_PLACEHOLDER", "ai.device.type": "DEVICE_TYPE_PLACEHOLDER", "ai.internal.sdkVersion": "SDK_VERSION_PLACEHOLDER"}, "data": {"baseType": "EventData", "baseData": {"ver": 2, "name": "test 2", "properties": {"foo": "bar", "x": 84}}}}' self.assertEqual(expected, actual) @@ -129,7 +130,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -147,7 +148,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -165,7 +166,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -186,7 +187,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" for item in sender.data.data.base_data.exceptions: for frame in item.parsed_stack: frame.file_name = os.path.basename(frame.file_name) @@ -204,7 +205,7 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" for item in sender.data.data.base_data.exceptions: for frame in item.parsed_stack: frame.file_name = os.path.basename(frame.file_name) @@ -218,7 +219,7 @@ client = TelemetryClient(channel.TelemetryChannel(context=None, queue=queue)) client.context.instrumentation_key = '99999999-9999-9999-9999-999999999999' client.context.device = None - client.track_request('test', 'http://tempuri.org', True, 'START_TIME', 13, '42', 'OPTIONS', { 'foo': 'bar' }, { 'x': 42 }) + client.track_request('test', 'http://tempuri.org', True, 'START_TIME', 13, 42, 'OPTIONS', { 'foo': 'bar' }, { 'x': 42 }, 'ID_PLACEHOLDER') client.flush() expected = '{"ver": 1, "name": "Microsoft.ApplicationInsights.Request", "time": "TIME_PLACEHOLDER", "sampleRate": 100.0, "iKey": "99999999-9999-9999-9999-999999999999", "tags": {"ai.device.id": "DEVICE_ID_PLACEHOLDER", "ai.device.locale": "DEVICE_LOCALE_PLACEHOLDER", "ai.device.osVersion": "DEVICE_OS_VERSION_PLACEHOLDER", "ai.device.type": "DEVICE_TYPE_PLACEHOLDER", "ai.internal.sdkVersion": "SDK_VERSION_PLACEHOLDER"}, "data": {"baseType": "RequestData", "baseData": {"ver": 2, "id": "ID_PLACEHOLDER", "name": "test", "duration": "00:00:00.013", "responseCode": "42", "success": true, "url": "http://tempuri.org", "properties": {"foo": "bar"}, "measurements": {"x": 42}}}}' sender.data.time = 'TIME_PLACEHOLDER' @@ -226,8 +227,26 @@ sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" - sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" - sender.data.data.base_data.id = 'ID_PLACEHOLDER' + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" + actual = json.dumps(sender.data.write()) + self.maxDiff = None + self.assertEqual(expected, actual) + + def test_track_dependency_works_as_expected(self): + sender = MockTelemetrySender() + queue = channel.SynchronousQueue(sender) + client = TelemetryClient(channel.TelemetryChannel(context=None, queue=queue)) + client.context.instrumentation_key = '99999999-9999-9999-9999-999999999999' + client.context.device = None + client.track_dependency('test', 'COMMAND_PLACEHOLDER', 'HTTP', 'localhost', 13, True, 200, { 'foo': 'bar' }, { 'x': 42 }, 'ID_PLACEHOLDER') + client.flush() + expected = '{"ver": 1, "name": "Microsoft.ApplicationInsights.RemoteDependency", "time": "TIME_PLACEHOLDER", "sampleRate": 100.0, "iKey": "99999999-9999-9999-9999-999999999999", "tags": {"ai.device.id": "DEVICE_ID_PLACEHOLDER", "ai.device.locale": "DEVICE_LOCALE_PLACEHOLDER", "ai.device.osVersion": "DEVICE_OS_VERSION_PLACEHOLDER", "ai.device.type": "DEVICE_TYPE_PLACEHOLDER", "ai.internal.sdkVersion": "SDK_VERSION_PLACEHOLDER"}, "data": {"baseType": "RemoteDependencyData", "baseData": {"ver": 2, "name": "test", "id": "ID_PLACEHOLDER", "resultCode": "200", "duration": "00:00:00.013", "success": true, "data": "COMMAND_PLACEHOLDER", "target": "localhost", "type": "HTTP", "properties": {"foo": "bar"}, "measurements": {"x": 42}}}}' + sender.data.time = 'TIME_PLACEHOLDER' + sender.data.tags['ai.internal.sdkVersion'] = 'SDK_VERSION_PLACEHOLDER' + sender.data.tags['ai.device.id'] = "DEVICE_ID_PLACEHOLDER" + sender.data.tags['ai.device.locale'] = "DEVICE_LOCALE_PLACEHOLDER" + sender.data.tags['ai.device.osVersion'] = "DEVICE_OS_VERSION_PLACEHOLDER" + sender.data.tags['ai.device.type'] = "DEVICE_TYPE_PLACEHOLDER" actual = json.dumps(sender.data.write()) self.maxDiff = None self.assertEqual(expected, actual) @@ -239,4 +258,4 @@ self.send_buffer_size = 1 def send(self, envelope): - self.data = envelope[0]; \ No newline at end of file + self.data = envelope[0]