Skip to content

Instantly share code, notes, and snippets.

@Nicanor008
Created December 19, 2018 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nicanor008/f28f086d8826dabb70c2662968f3c4e7 to your computer and use it in GitHub Desktop.
Save Nicanor008/f28f086d8826dabb70c2662968f3c4e7 to your computer and use it in GitHub Desktop.
implementation of TDD
class ViewTestCase(TestCase):
def setUp(self):
self.client = APIClient()
self.user = {'name': 'Nicanor'}
self.response = self.client.post(self.user,format="json")
def test_api_can_create_a_user(self):
self.assertEqual(self.response.status_code, status.HTTP_201_CREATED)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment