jasminefiner
9/24/2018 - 10:31 AM

18: Test Random Salts

UMS: User Models 18

# tests/test_user_model.py
# ...
class BasicTestCase(unittest.TestCase):
    # ...
    def check_password_salts_are_random(self):
        u1 = User(password='cat')
        u2 = User(password='cat')
        self.assertNotEqual(u1.password_hash, u2.password_hash)