mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-05-10 11:14:44 +00:00
Failing test for Django 1.7 makemigrations
======================================================================
ERROR: test_migrate (model_utils.tests.tests.MigrationsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/projects/django-model-utils/model_utils/tests/tests.py", line 42, in test_migrate
call_command('migrate', fake=True)
File "/home/user/projects/django-model-utils/.tox/py27-trunk/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 167, in call_command
return klass.execute(*args, **defaults)
File "/home/user/projects/django-model-utils/.tox/py27-trunk/local/lib/python2.7/site-packages/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File "/home/user/projects/django-model-utils/.tox/py27-trunk/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 138, in handle
ProjectState.from_apps(apps),
File "/home/user/projects/django-model-utils/.tox/py27-trunk/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 71, in from_apps
model_state = ModelState.from_model(model)
File "/home/user/projects/django-model-utils/.tox/py27-trunk/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 136, in from_model
e,
TypeError: Couldn't reconstruct field name_changed on tests.Monitored: MonitorField requires a "monitor" argument
This commit is contained in:
parent
3fe2394bfc
commit
f02b0912b2
1 changed files with 7 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ from django.db import models
|
|||
from django.db.models.fields import FieldDoesNotExist
|
||||
from django.utils.six import text_type
|
||||
from django.core.exceptions import ImproperlyConfigured, FieldError
|
||||
from django.core.management import call_command
|
||||
from django.test import TestCase
|
||||
|
||||
from model_utils import Choices, FieldTracker
|
||||
|
|
@ -31,6 +32,12 @@ from model_utils.tests.models import (
|
|||
InheritanceManagerTestChild3, StatusFieldChoicesName)
|
||||
|
||||
|
||||
class MigrationsTests(TestCase):
|
||||
@skipUnless(django.VERSION >= (1, 7, 0), "test only applies to Django 1.7+")
|
||||
def test_makemigrations(self):
|
||||
call_command('makemigrations', dry_run=True)
|
||||
|
||||
|
||||
class GetExcerptTests(TestCase):
|
||||
def test_split(self):
|
||||
e = get_excerpt("some content\n\n<!-- split -->\n\nsome more")
|
||||
|
|
|
|||
Loading…
Reference in a new issue