Commit 2c68df1a by Florian Apolloner

Moved tests to the toplevel.

parent 08579a12
......@@ -3,6 +3,8 @@ import os
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
......@@ -14,18 +16,16 @@ if not settings.configured:
INSTALLED_APPS=[
'django.contrib.contenttypes',
'taggit',
'taggit.tests',
'tests',
]
)
from django.test.simple import DjangoTestSuiteRunner
def runtests():
runner = DjangoTestSuiteRunner()
failures = runner.run_tests(['tests'], verbosity=1, interactive=True)
sys.exit(failures)
argv = sys.argv[:1] + ['test'] + sys.argv[1:]
execute_from_command_line(argv)
if __name__ == '__main__':
runtests(*sys.argv[1:])
runtests()
from __future__ import unicode_literals
from __future__ import unicode_literals, absolute_import
from django import forms
from taggit.tests.models import Food, DirectFood, CustomPKFood, OfficialFood
from .models import Food, DirectFood, CustomPKFood, OfficialFood
class FoodForm(forms.ModelForm):
......
from __future__ import unicode_literals
from __future__ import unicode_literals, absolute_import
from unittest import TestCase as UnitTestCase
......@@ -12,9 +12,9 @@ from django.utils.encoding import force_text
from taggit.managers import TaggableManager
from taggit.models import Tag, TaggedItem
from taggit.tests.forms import (FoodForm, DirectFoodForm, CustomPKFoodForm,
from .forms import (FoodForm, DirectFoodForm, CustomPKFoodForm,
OfficialFoodForm)
from taggit.tests.models import (Food, Pet, HousePet, DirectFood, DirectPet,
from .models import (Food, Pet, HousePet, DirectFood, DirectPet,
DirectHousePet, TaggedPet, CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedCustomPKPet, OfficialFood, OfficialPet, OfficialHousePet,
OfficialThroughModel, OfficialTag, Photo, Movie, Article)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment