Commits

Moises Henriquez  committed 84ac33f

Add testcase for passwords hash

  • Participants
  • Parent commits d227932

Comments (0)

Files changed (1)

File vinstall/backend/users.py

         self.fakeuser.login = "fakeuser"
         self.fakeuser.password = "fakepass"
         self.fakeuser._root = self.root
+	self.fakeadmin = User()
+	self.fakeadmin.password = "fakepassword"
 
     def test_user_created(self):
         self.fakeuser.create()
         self.assertEqual(ruser.login, self.fakeuser.login)
         self.fakeuser.delete()
 
+    def test_hashed_passwords(self):
+	hash1 = self.fakeuser.encrypt_password(self.fakeuser.password)
+	hash2 = self.fakeadmin.encrypt_password(self.fakeadmin.password)
+	self.assertTrue(hash1 != hash2)
+
 
 if __name__ == '__main__':
     assert os.getuid() == 0, "Must be root to run these tests"