Skip to content
Browse files

fixed two failing i18n tests - they only failed when using ./runtests…

…, now they work both ways. And template tests give tracebacks when they fail.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 3bbc2bd commit 3478fb51d6a1b7f27d2a6696c0e4b1f8b79fd9a8 Georg Bauer committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/othertests/
8 tests/othertests/
@@ -1,6 +1,8 @@
+import traceback
from django.core import template
from django.core.template import loader
-from django.utils.translation import activate, deactivate
+from django.utils.translation import activate, deactivate, install
# Helper objects for template tests
class SomeClass:
@@ -273,8 +275,11 @@ def run_tests(verbosity=0, standalone=False):
tests = TEMPLATE_TESTS.items()
for name, vals in tests:
+ install()
if 'LANGUAGE_CODE' in vals[1]:
+ else:
+ activate('en-us')
output = loader.get_template(name).render(template.Context(vals[1]))
except Exception, e:
@@ -283,6 +288,7 @@ def run_tests(verbosity=0, standalone=False):
print "Template test: %s -- Passed" % name
if verbosity:
+ traceback.print_exc()
print "Template test: %s -- FAILED. Got %s, exception: %s" % (name, e.__class__, e)

0 comments on commit 3478fb5

Please sign in to comment.
Something went wrong with that request. Please try again.