Skip to content

Commit

Permalink
🖊️ Remove redundant data
Browse files Browse the repository at this point in the history
  • Loading branch information
oakbani committed Feb 23, 2018
1 parent 7fd816b commit 4922af9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 610 deletions.
260 changes: 0 additions & 260 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,263 +381,3 @@ def setUp(self):

self.optimizely = optimizely.Optimizely(json.dumps(self.config_dict))
self.project_config = self.optimizely.config


class BaseTestV3(unittest.TestCase):

def setUp(self):
self.config_dict = {
'revision': '42',
'version': '2',
'events': [{
'key': 'test_event',
'experimentIds': ['111127'],
'id': '111095'
}, {
'key': 'Total Revenue',
'experimentIds': ['111127'],
'id': '111096'
}],
'experiments': [{
'key': 'test_experiment',
'status': 'Running',
'forcedVariations': {
'user_1': 'control',
'user_2': 'control'
},
'layerId': '111182',
'audienceIds': ['11154'],
'trafficAllocation': [{
'entityId': '111128',
'endOfRange': 4000
}, {
'entityId': '',
'endOfRange': 5000
}, {
'entityId': '111129',
'endOfRange': 9000
}],
'id': '111127',
'variations': [{
'key': 'control',
'id': '111128'
}, {
'key': 'variation',
'id': '111129'
}]
}],
'groups': [{
'id': '19228',
'policy': 'random',
'experiments': [{
'id': '32222',
'key': 'group_exp_1',
'status': 'Running',
'audienceIds': [],
'layerId': '111183',
'variations': [{
'key': 'group_exp_1_control',
'id': '28901'
}, {
'key': 'group_exp_1_variation',
'id': '28902'
}],
'forcedVariations': {
'user_1': 'group_exp_1_control',
'user_2': 'group_exp_1_control'
},
'trafficAllocation': [{
'entityId': '28901',
'endOfRange': 3000
}, {
'entityId': '28902',
'endOfRange': 9000
}]
}, {
'id': '32223',
'key': 'group_exp_2',
'status': 'Running',
'audienceIds': [],
'layerId': '111184',
'variations': [{
'key': 'group_exp_2_control',
'id': '28905'
}, {
'key': 'group_exp_2_variation',
'id': '28906'
}],
'forcedVariations': {
'user_1': 'group_exp_2_control',
'user_2': 'group_exp_2_control'
},
'trafficAllocation': [{
'entityId': '28905',
'endOfRange': 8000
}, {
'entityId': '28906',
'endOfRange': 10000
}]
}],
'trafficAllocation': [{
'entityId': '32222',
"endOfRange": 3000
}, {
'entityId': '32223',
'endOfRange': 7500
}]
}],
'accountId': '12001',
'attributes': [{
'key': 'test_attribute',
'id': '111094'
}],
'audiences': [{
'name': 'Test attribute users',
'conditions': '["and", ["or", ["or", '
'{"name": "test_attribute", "type": "custom_attribute", "value": "test_value_1"}]]]',
'id': '11154'
}, {
'name': 'Test attribute users',
'conditions': '["and", ["or", ["or", '
'{"name": "test_attribute", "type": "custom_attribute", "value": "test_value_2"}]]]',
'id': '11159'
}],
'projectId': '111001'
}

# datafile version 4
self.config_dict_with_features = {
'revision': '1',
'accountId': '12001',
'projectId': '111111',
'version': '4',
'events': [{
'key': 'test_event',
'experimentIds': ['111127'],
'id': '111095'
}],
'experiments': [{
'key': 'test_experiment',
'status': 'Running',
'forcedVariations': {},
'layerId': '111182',
'audienceIds': [],
'trafficAllocation': [{
'entityId': '111128',
'endOfRange': 5000
}, {
'entityId': '111129',
'endOfRange': 9000
}],
'id': '111127',
'variations': [{
'key': 'control',
'id': '111128',
'variables': [{
'id': '127', 'value': 'false'
}, {
'id': '128', 'value': 'prod'
}]
}, {
'key': 'variation',
'id': '111129'
}]
}],
'groups': [],
'attributes': [{
'key': 'test_attribute',
'id': '111094'
}],
'audiences': [{
'name': 'Test attribute users 1',
'conditions': '["and", ["or", ["or", '
'{"name": "test_attribute", "type": "custom_attribute", "value": "test_value_1"}]]]',
'id': '11154'
}, {
'name': 'Test attribute users 2',
'conditions': '["and", ["or", ["or", '
'{"name": "test_attribute", "type": "custom_attribute", "value": "test_value_2"}]]]',
'id': '11159'
}],
'rollouts': [{
'id': '201111',
'experiments': []
}, {
'id': '211111',
'experiments': [{
'id': '211127',
'key': '211127',
'status': 'Running',
'forcedVariations': {},
'layerId': '211111',
'audienceIds': ['11154'],
'trafficAllocation': [{
'entityId': '211129',
'endOfRange': 9000
}],
'variations': [{
'key': '211129',
'id': '211129'
}]
}, {
'id': '211137',
'key': '211137',
'status': 'Running',
'forcedVariations': {},
'layerId': '211111',
'audienceIds': ['11159'],
'trafficAllocation': [{
'entityId': '211139',
'endOfRange': 3000
}],
'variations': [{
'key': '211139',
'id': '211139'
}]
}, {
'id': '211147',
'key': '211147',
'status': 'Running',
'forcedVariations': {},
'layerId': '211111',
'audienceIds': [],
'trafficAllocation': [{
'entityId': '211149',
'endOfRange': 6000
}],
'variations': [{
'key': '211149',
'id': '211149'
}]
}]
}],
'featureFlags': [{
'id': '91111',
'key': '91111',
'experimentIds': ['111127'],
'rolloutId': '',
'variables': [{
'id': '127',
'key': '127',
'defaultValue': 'true',
'type': 'boolean',
}, {
'id': '128',
'key': '128',
'defaultValue': 'devel',
'type': 'string',
}]
}, {
'id': '91112',
'key': '91112',
'experimentIds': [],
'rolloutId': '211111',
'variables': [],
}]
}

self.optimizely = optimizely.Optimizely(json.dumps(self.config_dict))
self.config = project_config.ProjectConfig(json.dumps(self.config_dict),
logger.SimpleLogger(), error_handler.NoOpErrorHandler())
self.optimizely.event_builder = event_builder.EventBuilderV3(self.config)
self.project_config = self.optimizely.config
Loading

0 comments on commit 4922af9

Please sign in to comment.