Skip to content

azevakin/django-test-response

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

django-test-response

Better TestCase for test response.

Replace your code:

class FooTestCase(TestCase):
    def test_status_code(self):
        url = reverse('view-path', args=(10,))
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)

with this:

class FooTestCase(ResponseTestCase):
    def test_status_code(self):
        response = self.get(('view-path', args=(10,)))
        self.assertOK(response)

About

Better TestCase for test response

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages