コード例 #1
0
 def test_authenticate_with_wrong_password_returns_none(self):
     self.assertIsNone(FacilityBackend().authenticate("Mike", "goo"))
コード例 #2
0
 def test_nonexistent_user_returns_none(self):
     self.assertIsNone(FacilityBackend().get_user(4756))
コード例 #3
0
 def test_authenticate_nonexistent_user_returns_none(self):
     self.assertIsNone(FacilityBackend().authenticate("foo", "bar"))
コード例 #4
0
 def test_get_facility_user(self):
     self.assertEqual(self.user, FacilityBackend().get_user(self.user.id))
コード例 #5
0
 def test_get_device_owner(self):
     self.assertIsNone(FacilityBackend().get_user(self.do.id))
コード例 #6
0
 def test_facility_user_authenticated(self):
     self.assertEqual(
         self.user,
         FacilityBackend().authenticate(username="******", password="******"))
コード例 #7
0
 def test_device_owner_not_authenticated(self):
     self.assertIsNone(FacilityBackend().authenticate(username="******",
                                                      password="******"))
コード例 #8
0
 def test_authenticate_nonexistent_user_returns_none(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertIsNone(FacilityBackend().authenticate("foo", "bar"))
コード例 #9
0
 def test_authenticate_with_wrong_password_returns_none(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertIsNone(FacilityBackend().authenticate("Mike", "goo"))
コード例 #10
0
 def test_nonexistent_user_returns_none(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertIsNone(FacilityBackend().get_user(4756))
コード例 #11
0
 def test_get_device_owner(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertIsNone(FacilityBackend().get_user(self.do.id))
コード例 #12
0
 def test_get_facility_user(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertEqual(self.user, FacilityBackend().get_user(self.user.id))
コード例 #13
0
 def test_device_owner_not_authenticated(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertIsNone(FacilityBackend().authenticate(username="******", password="******"))
コード例 #14
0
 def test_facility_user_authenticated(self):
     from kolibri.auth.backends import FacilityBackend
     self.assertEqual(self.user, FacilityBackend().authenticate(username="******", password="******"))