-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update config_v6 sdk keys in the sample apps * string list check * spec char test
- Loading branch information
Showing
5 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
import logging | ||
import unittest | ||
|
||
import configcatclient | ||
from configcatclient.user import User | ||
|
||
logging.basicConfig(level=logging.INFO) | ||
|
||
_SDK_KEY = 'configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/u28_1qNyZ0Wz-ldYHIU7-g' | ||
|
||
|
||
class SpecialCharacterTests(unittest.TestCase): | ||
def setUp(self): | ||
self.client = configcatclient.get(_SDK_KEY) | ||
|
||
def tearDown(self): | ||
self.client.close() | ||
|
||
def test_special_characters_works_cleartext(self): | ||
actual = self.client.get_value("specialCharacters", "NOT_CAT", User('äöüÄÖÜçéèñışğ⢙✓😀')) | ||
self.assertEqual(actual, 'äöüÄÖÜçéèñışğ⢙✓😀') | ||
|
||
def test_special_characters_works_hashed(self): | ||
actual = self.client.get_value("specialCharactersHashed", "NOT_CAT", User('äöüÄÖÜçéèñışğ⢙✓😀')) | ||
self.assertEqual(actual, 'äöüÄÖÜçéèñışğ⢙✓😀') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |