def test_queryset_should_return_sessions_of_the_request_user(self):
     expected = [Session.objects.get(pk=1)]
     request = self.factory.get("/dashboard/sessions")
     request.user = User.objects.get(username="******")
     v = SessionsView()
     v.request = request
     sessions = v.get_queryset()
     self.assertEqual(expected, list(sessions))
Beispiel #2
0
 def test_queryset_should_return_sessions_of_the_request_user(self):
     expected = [Session.objects.get(pk=1)]
     request = self.factory.get("/dashboard/sessions")
     request.user = User.objects.get(username="******")
     v = SessionsView()
     v.request = request
     sessions = v.get_queryset()
     self.assertEqual(expected, list(sessions))
Beispiel #3
0
 def test_queryset_should_return_sessions_of_the_request_user(self):
     expected = Session.objects.all()
     request = self.factory.get("/dashboard/sessions")
     request.user = User.objects.get(username="******")
     v = SessionsView()
     v.request = request
     sessions = v.get_queryset()
     self.assertEqual([x.id for x in expected], [x.id for x in sessions])
Beispiel #4
0
 def test_queryset_should_return_sessions_of_the_request_user(self):
     expected = Session.objects.all()
     request = self.factory.get("/dashboard/sessions")
     request.user = User.objects.get(username="******")
     v = SessionsView()
     v.request = request
     sessions = v.get_queryset()
     self.assertEqual([x.id for x in expected],
                      [x.id for x in sessions])