def test_tag_without_checkin(self):
     """Should return `None` if the user is not checked-in anywhere."""
     user = UserFactory()
     result = get_checked_in_place(user)
     self.assertEqual(result, None)
 def test_tag_without_user(self):
     """Should return `None` if the user is anonymous."""
     user = AnonymousUser()
     result = get_checked_in_place(user)
     self.assertEqual(result, None)
 def test_tag_with_user(self):
     """Should return the place where the given user is checked-in."""
     checkin = CheckinFactory()
     result = get_checked_in_place(checkin.user)
     self.assertEqual(result, checkin.place)