def test_authenticate_with_wrong_password_returns_none(self): self.assertIsNone(FacilityBackend().authenticate("Mike", "goo"))
def test_nonexistent_user_returns_none(self): self.assertIsNone(FacilityBackend().get_user(4756))
def test_authenticate_nonexistent_user_returns_none(self): self.assertIsNone(FacilityBackend().authenticate("foo", "bar"))
def test_get_facility_user(self): self.assertEqual(self.user, FacilityBackend().get_user(self.user.id))
def test_get_device_owner(self): self.assertIsNone(FacilityBackend().get_user(self.do.id))
def test_facility_user_authenticated(self): self.assertEqual( self.user, FacilityBackend().authenticate(username="******", password="******"))
def test_device_owner_not_authenticated(self): self.assertIsNone(FacilityBackend().authenticate(username="******", password="******"))
def test_authenticate_nonexistent_user_returns_none(self): from kolibri.auth.backends import FacilityBackend self.assertIsNone(FacilityBackend().authenticate("foo", "bar"))
def test_authenticate_with_wrong_password_returns_none(self): from kolibri.auth.backends import FacilityBackend self.assertIsNone(FacilityBackend().authenticate("Mike", "goo"))
def test_nonexistent_user_returns_none(self): from kolibri.auth.backends import FacilityBackend self.assertIsNone(FacilityBackend().get_user(4756))
def test_get_device_owner(self): from kolibri.auth.backends import FacilityBackend self.assertIsNone(FacilityBackend().get_user(self.do.id))
def test_get_facility_user(self): from kolibri.auth.backends import FacilityBackend self.assertEqual(self.user, FacilityBackend().get_user(self.user.id))
def test_device_owner_not_authenticated(self): from kolibri.auth.backends import FacilityBackend self.assertIsNone(FacilityBackend().authenticate(username="******", password="******"))
def test_facility_user_authenticated(self): from kolibri.auth.backends import FacilityBackend self.assertEqual(self.user, FacilityBackend().authenticate(username="******", password="******"))