Created
September 21, 2016 15:18
-
-
Save inirudebwoy/00001dd498dd993426208a6c0f5b6f4b to your computer and use it in GitHub Desktop.
Setup function simplifying working with a Django client.
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
def setUp(self): | |
post = partial( | |
self.client.post, | |
path='/api/task/', | |
content_type='application/json') | |
self.post = lambda data: post(data=json.dumps(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment