コード例 #1
0
 def test_client_works_invalid_base_url(self):
     client = configcatclient.create_client_with_lazy_load(
         _SDK_KEY, base_url='https://invalidcdn.configcat.com')
     self.assertEqual('default value',
                      client.get_value('keySampleText', 'default value'))
     client.stop()
コード例 #2
0
 def test_wrong_param(self):
     client = configcatclient.create_client_with_lazy_load(_SDK_KEY, 0)
     self.assertEqual('This text came from ConfigCat',
                      client.get_value('keySampleText', 'default value'))
     client.stop()
コード例 #3
0
 def test_without_sdk_key(self):
     try:
         configcatclient.create_client_with_lazy_load(None)
         self.fail('Expected ConfigCatClientException')
     except ConfigCatClientException:
         pass