示例#1
0
    def test_003_unicode_insert(self):
        auth_cache.set_entry(
            'somekey3', u'ou=Geschäftsbereich,ou=People,dc=example,dc=org')

        result = auth_cache.get_entry('somekey3')
        self.assertEqual(
            result, 'ou=Gesch\xc3\xa4ftsbereich,ou=People,dc=example,dc=org')
示例#2
0
    def test_002_plain_encoding_insert(self):
        auth_cache.set_entry(
            'somekey2', 'ou=Geschäftsbereich,ou=People,dc=example,dc=org')

        result = auth_cache.get_entry('somekey2')
        self.assertEqual(
            result, 'ou=Gesch\xc3\xa4ftsbereich,ou=People,dc=example,dc=org')
示例#3
0
    def test_004_unicode_escape(self):
        auth_cache.set_entry(
            'somekey4',
            u'ou=Gesch\xc3\xa4ftsbereich,ou=People,dc=example,dc=org')

        result = auth_cache.get_entry('somekey4')
        self.assertEqual(
            result, u'ou=Gesch\xc3\xa4ftsbereich,ou=People,dc=example,dc=org')
示例#4
0
    def test_001_plain_insert(self):
        auth_cache.set_entry('somekey', 'ou=People,dc=example,dc=org')

        result = auth_cache.get_entry('somekey')
        self.assertEqual(result, 'ou=People,dc=example,dc=org')
示例#5
0
    def test_010_longkey_update(self):
        auth_cache.set_entry('v' + 'e' * 512 + 'rylongkey',
                             'v' + 'e' * 512 + 'rylongvalue2')

        result = auth_cache.get_entry('v' + 'e' * 512 + 'rylongkey')
        self.assertEqual(result, 'v' + 'e' * 512 + 'rylongvalue2')