Skip to content

Commit

Permalink
Chage test to check for HttpRequest instance
Browse files Browse the repository at this point in the history
  • Loading branch information
phala committed Jun 2, 2017
1 parent e6374f8 commit 6dcaeaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion formfactory/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.http.request import HttpRequest
from django.test import TestCase
from django.test.client import Client

Expand Down Expand Up @@ -265,4 +266,4 @@ def test_request_is_passed_to_forms(self):
response = self.client.get(
reverse("formfactory:form-detail", args=[self.simpleform.slug]),
)
self.assertTrue(hasattr(response.context["form"], "request"))
self.assertTrue(isinstance(response.context["form"].request, HttpRequest))

0 comments on commit 6dcaeaf

Please sign in to comment.