DEV Community

Discussion on: User registration and authorization on a django API with djoser and JSON web tokens.

Collapse
 
ce0la profile image
Olaniyi Oshunbote

I got the error NameError: name 'APITestCase' is not defined when I ran python manage.py test. No surprises there as that was not imported or earlier defined. How is this resolved?

Collapse
 
lewiskori profile image
Lewis kori • Edited

Hello Olaniyi,
Are you working on your own implementation of the code?
If so kindly share the GitHub link and we can debug together. Mine is working ok as far as I can tell.
Here's a screenshot of the same.

tests

Here's the code from the tests.py file.