def test_get_key_and_value(self): client = ConfigCatClient('test', 0, 0, None, 0, config_cache_class=ConfigCacheMock) result = client.get_key_and_value('fakeId1') self.assertEqual('key1', result.key) self.assertTrue(result.value) result = client.get_key_and_value('fakeId2') self.assertEqual('key2', result.key) self.assertFalse(result.value) client.stop()
def test_get_key_and_value_not_found(self): client = ConfigCatClient('test', 0, 0, None, 0, config_cache_class=ConfigCacheMock) result = client.get_key_and_value('nonexisting') self.assertIsNone(result) client.stop()
def test_get_key_and_value_empty_config(self): client = ConfigCatClient('test', 0, 0, None, 0) result = client.get_key_and_value('nonexisting') self.assertIsNone(result) client.stop()