Created
May 6, 2015 02:06
-
-
Save tingletech/c1f8218715b292824b2a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from django.contrib.auth.models import AnonymousUser, User | |
from django.test import TestCase, RequestFactory | |
from .views import search | |
class SimpleTest(TestCase): | |
def setUp(self): | |
# Every test needs access to the request factory. | |
self.factory = RequestFactory() | |
def test_details(self): | |
request = self.factory.get('/', { 'q':'' }) | |
response = search(request) | |
print(response) | |
self.assertEqual(response.status_code, 200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment