Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9ba18c

Browse files
authored
Merge pull request #65 from splitio/hotfix-traffic-allocation-py3
Hotfix traffic allocation py3
2 parents 9b78907 + ce91c0a commit e9ba18c

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
4.1.1 (May 25, 2017)
2+
- Python 3 fixed incompatible comparison between None an integer
13
4.1.0 (May 16, 2017)
24
- Adding support for String and Set Matchers
35
4.0.2 (May 8, 2017)

splitio/tests/test_splits.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,12 @@ def setUp(self):
10631063
raw_split['trafficAllocationSeed'] = -1
10641064
self._splitObjects['rollout2'] = split_parser.parse(raw_split, True)
10651065

1066+
raw_split['name'] = 'test4'
1067+
raw_split['trafficAllocation'] = None #must be mapped as 100
1068+
raw_split['trafficAllocationSeed'] = -1
1069+
self._splitObjects['rollout3'] = split_parser.parse(raw_split, True)
1070+
1071+
10661072
def testTrafficAllocation(self):
10671073
'''
10681074
'''
@@ -1080,3 +1086,8 @@ def testTrafficAllocation(self):
10801086
self._splitObjects['rollout2'], 'testKey', None
10811087
)
10821088
self.assertEqual(treatment3, 'default')
1089+
1090+
treatment4, label1 = self._client._get_treatment_for_split(
1091+
self._splitObjects['rollout3'], 'testKey', None
1092+
)
1093+
self.assertEqual(treatment4, 'on')

splitio/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.1.0'
1+
__version__ = '4.1.1'

0 commit comments

Comments
 (0)