Skip to content

Commit

Permalink
Test that default South configuration raises error
Browse files Browse the repository at this point in the history
  • Loading branch information
treyhunner committed Apr 5, 2014
1 parent 8f055c0 commit fddd062
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from unittest import TestCase as UnitTestCase
try:
from unittest import skipIf
from unittest import skipIf, skipUnless
except:
from django.utils.unittest import skipIf
from django.utils.unittest import skipIf, skipUnless

import django
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.core import serializers
from django.db import connection
from django.test import TestCase, TransactionTestCase
Expand Down Expand Up @@ -560,3 +560,13 @@ def test_deconstruct_kwargs_kept(self):
name, path, args, kwargs = instance.deconstruct()
new_instance = TaggableManager(*args, **kwargs)
self.assertEqual(instance.rel.through, new_instance.rel.through)


@skipUnless(django.VERSION < (1, 7), "test only applies to 1.6 and below")
class SouthSupportTests(TestCase):
def test_import_migrations_module(self):
try:
from taggit.migrations import __doc__ # noqa
except ImproperlyConfigured as e:
exception = e
self.assertIn("SOUTH_MIGRATION_MODULES", exception.args[0])

0 comments on commit fddd062

Please sign in to comment.