my django project
Subject
accounts
courses
views.py
tests
test_models.py
subject
test_models.py:
from django.core.urlresolvers import reverse
from django.test import TestCase
from .models import MultiSubject
from accounts.models import User
class DjanoRestFrameworkTests(TestCase):
def setUp(self):
part=Part.objects.get(pk=2)
MultiSubject.get_or_create(part=part, number=1, title="", description=":?")
def test_MultiSubject(self):
title = MultiSubject.get(title="")
description = MultiSubject.get(description=":?")
self.assertEqual(
title.get_title, " : :?"
)
run python manage.py test error
django.db.utils.ProgrammingError: relation "accounts_user" does not exist
both python manage.py makemigrations and python manage.py miagrate can execute normally
what is the reason