Hi Carlton, I'm running my tests via Microsoft Visual Studio.
Maybe that's why I've got that problem. By the way, maybe this is a subject for another thread, but, in regards to my unit test, is there a better way way of testing my model class? I'm finishing testing the CRUD operations though. Would you have any sample for model class unit testing, using Django Rest Framework? Also, how about my views and serializers, should I test them too? If so, how can I do that? Thank you very much! Alex On Mon, Aug 20, 2018 at 5:17 PM, Carlton Gibson <[email protected]> wrote: > How are you running your tests? (django-admin test does all this for you…) > > > On 20 Aug 2018, at 10:16, Alexander Lamas <[email protected]> > wrote: > > I actually, just found out that I have to add these 2 lines in the > beginning of my test file. > > import django > django.setup() > > then everything works as expected. > > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
