示例#1
0
 def test_invalidation(self):
     client = ConfigCatClient('test',
                              0,
                              0,
                              None,
                              0,
                              config_cache_class=ConfigCacheMock)
     self.assertEqual(True, client.get_value('testBoolKey', False))
     client.stop()
示例#2
0
 def test_int(self):
     client = ConfigCatClient('test',
                              0,
                              0,
                              None,
                              0,
                              config_cache_class=ConfigCacheMock)
     self.assertEqual(1, client.get_value('testIntKey', 0))
     client.stop()
示例#3
0
 def test_double(self):
     client = ConfigCatClient('test',
                              0,
                              0,
                              None,
                              0,
                              config_cache_class=ConfigCacheMock)
     self.assertEqual(1.1, client.get_value('testDoubleKey', 0.0))
     client.stop()
示例#4
0
 def test_unknown(self):
     client = ConfigCatClient('test',
                              0,
                              0,
                              None,
                              0,
                              config_cache_class=ConfigCacheMock)
     self.assertEqual('default',
                      client.get_value('testUnknownKey', 'default'))
     client.stop()
示例#5
0
 def test_string(self):
     client = ConfigCatClient('test',
                              0,
                              0,
                              None,
                              0,
                              config_cache_class=ConfigCacheMock)
     self.assertEqual('testValue',
                      client.get_value('testStringKey', 'default'))
     client.stop()