def test_kill_locally(self): """Test kill local.""" storage = InMemorySplitStorage() split = Split('some_split', 123456789, False, 'some', 'traffic_type', 'ACTIVE', 1) storage.put(split) storage.set_change_number(1) storage.kill_locally('test', 'default_treatment', 2) assert storage.get('test') is None storage.kill_locally('some_split', 'default_treatment', 0) assert storage.get('some_split').change_number == 1 assert storage.get('some_split').killed is False assert storage.get('some_split').default_treatment == 'some' storage.kill_locally('some_split', 'default_treatment', 3) assert storage.get('some_split').change_number == 3
def test_store_get_changenumber(self): """Test that storing and retrieving change numbers works.""" storage = InMemorySplitStorage() assert storage.get_change_number() == -1 storage.set_change_number(5) assert storage.get_change_number() == 5