Beispiel #1
0
 def test_login(self):
     self.Supervisor1 = Supervisor("*****@*****.**", "DEFAULT_PASSWORD", "DEFAULT")
     self.assertEquals(Supervisor.login("*****@*****.**", "DEFAULT_PASSWORD"), "Login successful")
     model_supervisor1 = models.ModelPerson.objects.get(email=self.Supervisor1.email)
     self.assertTrue(model_supervisor1.isLoggedOn)
     self.assertEquals(Supervisor.login("*****@*****.**", "DEFAULT_PASSWORD"), "User already logged in")
     self.assertEquals(Supervisor.login("*****@*****.**", "password"), "User already logged in")
Beispiel #2
0
 def test_logout(self):
     self.Supervisor1 = Supervisor("*****@*****.**", "DEFAULT_PASSWORD", "DEFAULT")
     self.assertEquals(Supervisor.login("*****@*****.**", "DEFAULT_PASSWORD"), "Login successful")
     self.assertTrue(self.Supervisor1.logout())