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
5 changes: 3 additions & 2 deletions splitio/models/splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

SplitView = namedtuple(
'SplitView',
['name', 'traffic_type', 'killed', 'treatments', 'change_number']
['name', 'traffic_type', 'killed', 'treatments', 'change_number', 'configs']
)


Expand Down Expand Up @@ -191,7 +191,8 @@ def to_split_view(self):
self.traffic_type_name,
self.killed,
list(set(part.treatment for cond in self.conditions for part in cond.partitions)),
self.change_number
self.change_number,
self._configurations if self._configurations is not None else {}
)

@python_2_unicode_compatible
Expand Down
9 changes: 9 additions & 0 deletions tests/client/test_localhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,13 @@ def test_localhost_e2e(self):
assert client.get_treatment_with_config('key_whitelist', 'other_feature_3') == ('on', None)
assert client.get_treatment_with_config('any_other_key', 'other_feature_3') == ('off', None)

manager = factory.manager()
assert manager.split('my_feature').configs == {
'on': '{"desc" : "this applies only to ON treatment"}',
'off': '{"desc" : "this applies only to OFF and only for only_key. The rest will receive ON"}'
}
assert manager.split('other_feature').configs == {}
assert manager.split('other_feature_2').configs == {}
assert manager.split('other_feature_3').configs == {}