Skip to content

Commit

Permalink
Rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabbasrizvi committed Mar 20, 2017
1 parent 2fd6c0d commit 7565065
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 26 deletions.
20 changes: 8 additions & 12 deletions tests/test_event_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,20 +404,17 @@ def test_create_conversion_event__with_event_value(self):
'name': 'revenue',
'value': 4200
}],
'eventFeatures': [
{
'eventFeatures': [{
'id': 'non-revenue',
'type': 'custom',
'value': 'abc',
'shouldIndex': False,
},
{
}, {
'id': 'revenue',
'type': 'custom',
'value': 4200,
'shouldIndex': False,
}
],
}],
'layerStates': [{
'layerId': '111182',
'revision': '42',
Expand Down Expand Up @@ -463,23 +460,22 @@ def test_create_conversion_event__with_invalid_event_value(self):
'visitorId': 'test_user',
'eventName': 'test_event',
'eventEntityId': '111095',
'revision': '42',
'eventMetrics': [],
'eventFeatures': [
{
'eventFeatures': [{
'id': 'non-revenue',
'type': 'custom',
'value': 'abc',
'shouldIndex': False,
},
{
}, {
'id': 'revenue',
'type': 'custom',
'value': '4200',
'shouldIndex': False,
}
],
}],
'layerStates': [{
'layerId': '111182',
'revision': '42',
'decision': {
'experimentId': '111127',
'variationId': '111129',
Expand Down
25 changes: 11 additions & 14 deletions tests/test_optimizely.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ def test_track__with_event_value(self):
'visitorId': 'test_user',
'clientVersion': version.__version__,
'clientEngine': 'python-sdk',
'revision': '42',
'userFeatures': [{
'shouldIndex': True,
'type': 'custom',
Expand All @@ -773,26 +774,24 @@ def test_track__with_event_value(self):
'isGlobalHoldback': False,
'eventEntityId': '111095',
'eventName': 'test_event',
'eventFeatures': [
{
'eventFeatures': [{
'id': 'non-revenue',
'type': 'custom',
'value': 'abc',
'shouldIndex': False,
},
{
}, {
'id': 'revenue',
'type': 'custom',
'value': 4200,
'shouldIndex': False,
},
],
}],
'eventMetrics': [{
'name': 'revenue',
'value': 4200
}],
'timestamp': 42000,
'layerStates': [{
'revision': '42',
'decision': {
'variationId': '111128',
'isLayerHoldback': False,
Expand Down Expand Up @@ -834,14 +833,12 @@ def test_track__with_deprecated_event_value(self):
'isGlobalHoldback': False,
'eventEntityId': '111095',
'eventName': 'test_event',
'eventFeatures': [
{
'eventFeatures': [{
'id': 'revenue',
'type': 'custom',
'value': 4200,
'shouldIndex': False,
}
],
}],
'eventMetrics': [{
'name': 'revenue',
'value': 4200
Expand Down Expand Up @@ -881,6 +878,7 @@ def test_track__with_invalid_event_value(self):
'visitorId': 'test_user',
'clientVersion': version.__version__,
'clientEngine': 'python-sdk',
'revision': '42',
'userFeatures': [{
'shouldIndex': True,
'type': 'custom',
Expand All @@ -892,17 +890,16 @@ def test_track__with_invalid_event_value(self):
'isGlobalHoldback': False,
'eventEntityId': '111095',
'eventName': 'test_event',
'eventFeatures': [
{
'eventFeatures': [{
'id': 'revenue',
'type': 'custom',
'value': '4200',
'shouldIndex': False,
}
],
}],
'eventMetrics': [],
'timestamp': 42000,
'layerStates': [{
'revision': '42',
'decision': {
'variationId': '111128',
'isLayerHoldback': False,
Expand Down

0 comments on commit 7565065

Please sign in to comment.