From 7328b18f54c0c40fcbe66093c3b547a8cd7a539c Mon Sep 17 00:00:00 2001 From: aliabbasrizvi Date: Fri, 23 Dec 2016 00:32:28 +0530 Subject: [PATCH] Switching to logx.optimizely --- optimizely/event_builder.py | 4 ++-- tests/test_optimizely.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/optimizely/event_builder.py b/optimizely/event_builder.py index 80146017..0c3952f4 100644 --- a/optimizely/event_builder.py +++ b/optimizely/event_builder.py @@ -250,8 +250,8 @@ class EventBuilderV2(BaseEventBuilder): """ Class which encapsulates methods to build events for tracking impressions and conversions using the new endpoints. """ - IMPRESSION_ENDPOINT = 'https://p13nlog.dz.optimizely.com/log/decision' - CONVERSION_ENDPOINT = 'https://p13nlog.dz.optimizely.com/log/event' + IMPRESSION_ENDPOINT = 'https://logx.optimizely.com/log/decision' + CONVERSION_ENDPOINT = 'https://logx.optimizely.com/log/event' HTTP_VERB = 'POST' HTTP_HEADERS = {'Content-Type': 'application/json'} EVENT_VALUE_METRIC = 'revenue' diff --git a/tests/test_optimizely.py b/tests/test_optimizely.py index 35d50c8e..9d8994b5 100644 --- a/tests/test_optimizely.py +++ b/tests/test_optimizely.py @@ -498,7 +498,7 @@ def test_activate(self): self.project_config.get_experiment_from_key('test_experiment'), None) mock_bucket.assert_called_once_with(self.project_config.get_experiment_from_key('test_experiment'), 'test_user') self.assertEqual(1, mock_dispatch_event.call_count) - self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://p13nlog.dz.optimizely.com/log/decision', + self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://logx.optimizely.com/log/decision', expected_params, 'POST', {'Content-Type': 'application/json'}) def test_activate__with_attributes__audience_match(self): @@ -540,7 +540,7 @@ def test_activate__with_attributes__audience_match(self): {'test_attribute': 'test_value'}) mock_bucket.assert_called_once_with(self.project_config.get_experiment_from_key('test_experiment'), 'test_user') self.assertEqual(1, mock_dispatch_event.call_count) - self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://p13nlog.dz.optimizely.com/log/decision', + self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://logx.optimizely.com/log/decision', expected_params, 'POST', {'Content-Type': 'application/json'}) def test_activate__with_attributes__no_audience_match(self): @@ -658,7 +658,7 @@ def test_track__with_attributes(self): } mock_bucket.assert_called_once_with(self.project_config.get_experiment_from_key('test_experiment'), 'test_user') self.assertEqual(1, mock_dispatch_event.call_count) - self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://p13nlog.dz.optimizely.com/log/event', + self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://logx.optimizely.com/log/event', expected_params, 'POST', {'Content-Type': 'application/json'}) def test_track__with_attributes__no_audience_match(self): @@ -730,7 +730,7 @@ def test_track__with_event_value(self): } mock_bucket.assert_called_once_with(self.project_config.get_experiment_from_key('test_experiment'), 'test_user') self.assertEqual(1, mock_dispatch_event.call_count) - self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://p13nlog.dz.optimizely.com/log/event', + self._validate_event_object(mock_dispatch_event.call_args[0][0], 'https://logx.optimizely.com/log/event', expected_params, 'POST', {'Content-Type': 'application/json'}) def test_track__experiment_not_running(self):