Пример #1
0
    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))