summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2011-03-14 23:00:03 +0000
committerAdrian Holovaty <adrian@holovaty.com>2011-03-14 23:00:03 +0000
commit4e25bc71b18e609768c4cf99854f350a5bc8e44d (patch)
treebe95ebd9050f21d8fe29f6bec9edd06fa6f1cfad /tests
parentf43b3f58fb60a281c9db34c95f4a2a6384f40693 (diff)
Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_views/models.py2
-rw-r--r--tests/regressiontests/queries/tests.py2
-rw-r--r--tests/regressiontests/templates/tests.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py
index 220b4a3575..b65f8a4b37 100644
--- a/tests/regressiontests/admin_views/models.py
+++ b/tests/regressiontests/admin_views/models.py
@@ -252,7 +252,7 @@ class BasePersonModelFormSet(BaseModelFormSet):
person = person_dict.get('id')
alive = person_dict.get('alive')
if person and alive and person.name == "Grace Hopper":
- raise forms.ValidationError, "Grace is not a Zombie"
+ raise forms.ValidationError("Grace is not a Zombie")
class PersonAdmin(admin.ModelAdmin):
list_display = ('name', 'gender', 'alive')
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py
index c13ca2c4b4..c87ecd32df 100644
--- a/tests/regressiontests/queries/tests.py
+++ b/tests/regressiontests/queries/tests.py
@@ -33,7 +33,7 @@ class BaseQuerysetTest(TestCase):
excName = exc.__name__
else:
excName = str(exc)
- raise AssertionError, "%s not raised" % excName
+ raise AssertionError("%s not raised" % excName)
class Queries1Tests(BaseQuerysetTest):
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index cb831348ce..10c7a37258 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -389,7 +389,7 @@ class Templates(unittest.TestCase):
try:
return (template_tests[template_name][0] , "test:%s" % template_name)
except KeyError:
- raise template.TemplateDoesNotExist, template_name
+ raise template.TemplateDoesNotExist(template_name)
cache_loader = cached.Loader(('test_template_loader',))
cache_loader._cached_loaders = (test_template_loader,)