Created
April 14, 2011 10:17
-
-
Save Enome/919225 to your computer and use it in GitHub Desktop.
Virtual Browser vs RequestFactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_should_return_200(self): | |
response = self.client.get(reverse('auth-registration')) | |
self.assertEqual(response.status_code, 200) | |
def test_shold_return_200_again(self): | |
request_factory = RequestFactory() | |
request = request_factory.get((reverse('auth-registration'))) | |
registration_view = RegistrationView.as_view() | |
response = registration_view(request) | |
self.assertEqual(response.status_code, 200) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment