from django.test import TestCase from django.contrib.auth.models import User class BaseData(TestCase): @classmethod def setUpTestData(cls): User.objects.create_user( username='testpeter', password='Develop123' ).save()