Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions optimizely/event_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions tests/test_optimizely.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down