示例#1
0
文件: tests.py 项目: bmcd87/crypto
    def test_challenge_13(self):
        """ Challenge 13: ECB cut and paste """

        encrypted_profile = aestools.create_admin_profile(encoding.profile_for)
        self.assertTrue(encoding.is_admin(encrypted_profile))
示例#2
0
 def test_is_admin(self):
     user = encoding.profile_for('*****@*****.**')
     admin = encoding.profile_for('*****@*****.**', 'admin')
     self.assertFalse(encoding.is_admin(user))
     self.assertTrue(encoding.is_admin(admin))