diff options
Diffstat (limited to 'passlib/tests/test_context.py')
-rw-r--r-- | passlib/tests/test_context.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/passlib/tests/test_context.py b/passlib/tests/test_context.py index 85dc7d0..cdd8746 100644 --- a/passlib/tests/test_context.py +++ b/passlib/tests/test_context.py @@ -423,6 +423,14 @@ sha512_crypt__min_rounds = 45000 self.assertRaises(TypeError, CryptContext, category__scheme__option__invalid = 30000) + # keys with mixed separators should be handled correctly. + # (testing actual data, not to_dict(), since re-render hid original bug) + self.assertRaises(KeyError, parse, + **{"admin.context__schemes":"md5_crypt"}) + ctx = CryptContext(**{"schemes":"md5_crypt,des_crypt", + "admin.context__default":"des_crypt"}) + self.assertEqual(ctx.default_scheme("admin"), "des_crypt") + # # context option -specific tests # |