Created
April 8, 2015 12:54
-
-
Save key/205f6a1b3c5fb2d85ed2 to your computer and use it in GitHub Desktop.
django test sample
This file contains 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 | |
class SomeAPITestCase(TestCase): | |
fixtures = [ | |
'fixtures/someapi/user.yaml', | |
] | |
def setUp(self): | |
super(SomeAPITestCase, self).setUp() | |
from django.contrib.auth.models import User | |
self.user = User.objects.get(pk=1) | |
def test_base_ajax_view_success_response(self): | |
from apps.someapi.api import foobar | |
self.assertTrue(foobar(self.user)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment