# HG changeset patch # User Branko Majic # Date 2013-06-25 20:37:22 # Node ID 109d23889f37599ccb545e764804ee548d80cf0b # Parent 94adf07f332cc483e55a95808a255e1114200f02 Enabled Django Discover Runner for running tests. Moved the tests under its own subdirectory. diff --git a/conntrackt/tests/__init__.py b/conntrackt/tests/__init__.py new file mode 100644 diff --git a/conntrackt/tests/test_forms.py b/conntrackt/tests/test_forms.py new file mode 100644 diff --git a/conntrackt/tests.py b/conntrackt/tests/test_iptables.py rename from conntrackt/tests.py rename to conntrackt/tests/test_iptables.py --- a/conntrackt/tests.py +++ b/conntrackt/tests/test_iptables.py @@ -2,7 +2,7 @@ from django.test import TestCase # Application imports. -import iptables +from conntrackt import iptables class RuleTest(TestCase): diff --git a/conntrackt/tests/test_models.py b/conntrackt/tests/test_models.py new file mode 100644 diff --git a/conntrackt/tests/test_views.py b/conntrackt/tests/test_views.py new file mode 100644 diff --git a/projtest/projtest/settings.py b/projtest/projtest/settings.py --- a/projtest/projtest/settings.py +++ b/projtest/projtest/settings.py @@ -131,6 +131,8 @@ INSTALLED_APPS = ( 'south', # Generic mixins for Django. 'braces', + # Enable test-runner. + 'discover_runner', ) # A sample logging configuration. The only tangible logging @@ -164,3 +166,6 @@ LOGGING = { # View that should be called for log-in action. LOGIN_URL="login" + +# Use custom test runner. +TEST_RUNNER = 'discover_runner.DiscoverRunner'