Created
November 12, 2015 21:25
-
-
Save ricomoss/40fcb7375125ed663e8a 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.test import TestCase, Client | |
class SomeTestCase(TestCase): | |
def test_post_success(self): | |
client = Client() | |
data = { | |
'api_key': self.rod_client.api_key, | |
'username': 'test_user1', | |
'hero_name': 'test_hero1', | |
'zone_index': 1, | |
'stage_index': 1, | |
'deck_index': 1, | |
} | |
resp = client.post(reverse('some:django:namespace'), data) | |
content = json.loads(resp.content.decode('utf-8')) | |
self.assertTrue(content['success']) | |
self.assertIsNotNone(content['data']['results']) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment