Skip to content

Instantly share code, notes, and snippets.

@teserak
teserak / testcase.py
Created November 14, 2011 07:04 — forked from prestontimmons/testcase.py
Lazy man's Django testcase
"""
Decrease the verbosity of writing view tests.
Old way:
self.client.get(reverse("my-view"))
self.client.post(reverse("my-view"), data={"key": "value"})
self.client.login("username", "password")
self.client.get(reverse("my-other-view"))
self.client.logout()