def test_generate_cek(self): cek1 = generate_key("user1", "user_ik_1") cek2 = generate_key("user1", "user_ik_1") cek3 = generate_key("user2", "user_ik_2") self.assertEquals(cek1, cek2) self.assertNotEquals(cek1, cek3) self.assertNotEquals(cek2, cek3)
def test_generate_cek_different_pepper(self): cek1 = generate_key("user1", "user_ik_1") cek2 = generate_key("user1", "user_ik_1", "test") self.assertNotEquals(cek1, cek2)