@@ -973,15 +973,6 @@ def test_localhost_json_e2e(self):
973973 assert client .get_treatment ("key" , "SPLIT_1" , None ) == 'control'
974974 assert client .get_treatment ("key" , "SPLIT_2" , None ) == 'on'
975975
976- # Tests 2
977- # self.factory._storages['splits'].remove('SPLIT_2')
978- # self.factory._sync_manager._synchronizer._split_synchronizers._split_sync._split_storage.set_change_number(-1)
979- # self._update_temp_file(splits_json['splitChange2_1'])
980- # self._synchronize_now()
981-
982- # assert self.factory.manager().split_names() == ["SPLIT_1"]
983- # assert client.get_treatment("key", "SPLIT_1", None) == 'off'
984-
985976 # Tests 3
986977 self .factory ._storages ['splits' ].remove ('SPLIT_1' )
987978 self .factory ._sync_manager ._synchronizer ._split_synchronizers ._split_sync ._split_storage .set_change_number (- 1 )
@@ -1061,6 +1052,15 @@ def test_localhost_json_e2e(self):
10611052 assert client .get_treatment ("key" , "SPLIT_1" , None ) == 'control'
10621053 assert client .get_treatment ("key" , "SPLIT_2" , None ) == 'on'
10631054
1055+ # Tests 2
1056+ self .factory ._storages ['splits' ].remove ('SPLIT_2' )
1057+ self .factory ._sync_manager ._synchronizer ._split_synchronizers ._split_sync ._split_storage .set_change_number (- 1 )
1058+ self ._update_temp_file (splits_json ['splitChange2_1' ])
1059+ self ._synchronize_now ()
1060+
1061+ assert self .factory .manager ().split_names () == ["SPLIT_1" ]
1062+ assert client .get_treatment ("key" , "SPLIT_1" , None ) == 'off'
1063+
10641064 def _update_temp_file (self , json_body ):
10651065 f = open (os .path .join (os .path .dirname (__file__ ), 'files' ,'split_changes_temp.json' ), 'w' )
10661066 f .write (json .dumps (json_body ))
0 commit comments