summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Kubasik <kevin@kubasik.net>2009-06-26 09:52:22 +0000
committerKevin Kubasik <kevin@kubasik.net>2009-06-26 09:52:22 +0000
commita7c8169fda81f00434e6bc1a3a34f32e06054748 (patch)
tree61ce3c1283a7222ace7a9d2fe8c8d0b7336d0a38 /tests
parent2dd363fc0c608556edf852552434591a7d519bc7 (diff)
downloaddjango-a7c8169fda81f00434e6bc1a3a34f32e06054748.tar.gz
r10926@kevin-kubasiks-macbook: kkubasik | 2009-06-26 03:20:06 -0600
[gsoc2009-testing] Confirmed that the command line triggers have the desired effect when combined. Runner is nearing phase 1 feature complete git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/test-improvements@11113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_views/windmilltests/__init__.py9
-rwxr-xr-xtests/runtests.py16
2 files changed, 14 insertions, 11 deletions
diff --git a/tests/regressiontests/admin_views/windmilltests/__init__.py b/tests/regressiontests/admin_views/windmilltests/__init__.py
index 8fa8dcac92..05bddd2a27 100644
--- a/tests/regressiontests/admin_views/windmilltests/__init__.py
+++ b/tests/regressiontests/admin_views/windmilltests/__init__.py
@@ -2,9 +2,9 @@
# from django.test import windmill_tests as djangotest
# #from windmill.authoring import djangotest
-#from windmill.conf import global_settings
-#ADMIN_URL = "%s/test_admin/admin" % global_settings.TEST_URL
-ADMIN_URL = 'http://localhost:8000/test_admin/admin/'
+from windmill.conf import global_settings
+ADMIN_URL = "%s/test_admin/admin" % global_settings.TEST_URL
+#ADMIN_URL = 'http://localhost:8000/test_admin/admin/'
#
# class TestProjectWindmillTest(djangotest.WindmillDjangoUnitTest):
@@ -21,6 +21,7 @@ ADMIN_URL = 'http://localhost:8000/test_admin/admin/'
# # pass
#
from windmill.authoring import WindmillTestClient
+#from django.test.windmill_tests import calling_func_name
def test_loginAndSetup():
'''Mostly just a proof of concept to test working order of tests.'''
@@ -494,4 +495,4 @@ def test_contribFlatSitesRedirect():
client.waits.forPageLoad(timeout=u'8000')
client.asserts.assertText(xpath=u'/html/body', validator=u'\nThis is some unique test content.\n')
client.open(url=u'http://localhost:8000/test_admin/admin/')
- client.waits.forPageLoad(timeout=u'8000') \ No newline at end of file
+ client.waits.forPageLoad(timeout=u'8000')
diff --git a/tests/runtests.py b/tests/runtests.py
index 0048f25f39..e12a5e2581 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -183,6 +183,7 @@ def django_tests(verbosity, interactive, test_labels):
#'from .* import .*', 'import .*', ]
settings.COVERAGE_ADDITIONAL_MODULES = ['django']
# 'from .* import .*', 'import .*',
+ failures = 0
#Run the appropriate test runner based on parameters.
if(do_std):
if(do_coverage):
@@ -206,7 +207,8 @@ def django_tests(verbosity, interactive, test_labels):
from windmill.conf import global_settings
from django.core.management.commands.test_windmill import ServerContainer, attempt_import
from django.test.windmill_tests import WindmillDjangoUnitTest
- #from django.db.models.loading import cache
+ from django.db.models.loading import remove_model
+ remove_model('invalid_models')
#from django.utils.importlib import import_module
#from django.contrib import admin
# print cache.app_models
@@ -325,12 +327,12 @@ def django_tests(verbosity, interactive, test_labels):
from functest import runner
runner.CLIRunner.final = classmethod(lambda self, totals: testtotals.update(totals) )
import windmill
- for t in tests:
- setup_module(t[1])
- #sys.argv = sys.argv + wmtests
- sys.argv = wmtests
- bin.cli()
- teardown_module(t[1])
+ #for t in tests:
+ setup_module(tests[0][1])
+ #sys.argv = sys.argv + wmtests
+ sys.argv = wmtests
+ bin.cli()
+ teardown_module(tests[0][1])
if testtotals['fail'] is not 0:
sleep(.5)
sys.exit(1)