Exemplo n.º 1
0
 def test_get_request(self):
     request = HttpRequest()
     request.method = "GET"
     request.user = self.user
     self.assertEqual(
         views.upload(request).content,
         views.index(request).content)
Exemplo n.º 2
0
 def test_get_request(self):
     request = HttpRequest()
     request.method = "GET"
     request.user = self.user
     self.assertEqual(
         views.upload(request).content,
         views.index(request).content)
Exemplo n.º 3
0
 def test_post_is_405(self):
     request = self.factory.post(reverse('cropduster-index'), {})
     response = views.index(request)
     self.assertEqual(response.status_code, 405)
Exemplo n.º 4
0
 def test_get_is_200(self):
     request = self.factory.get(reverse('cropduster-index'))
     response = views.index(request)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 5
0
 def test_post_is_405(self):
     request = self.factory.post(reverse('cropduster-index'), {})
     request.user = self.user
     response = views.index(request)
     self.assertEqual(response.status_code, 405)
Exemplo n.º 6
0
 def test_get_is_200(self):
     request = self.factory.get(reverse('cropduster-index'))
     request.user = self.user
     response = views.index(request)
     self.assertEqual(response.status_code, 200)