From d3ccb0c42a85f2541b311b826b6c100bb28979ca Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 7 May 2012 09:04:31 +0200 Subject: [PATCH] Stop using a context manager when we don't need it really. --- dbtemplates/tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dbtemplates/tests.py b/dbtemplates/tests.py index f5741d7..05ac2db 100644 --- a/dbtemplates/tests.py +++ b/dbtemplates/tests.py @@ -1,4 +1,3 @@ -from __future__ import with_statement import codecs import os import shutil @@ -76,8 +75,8 @@ class DbTemplatesTestCase(TestCase): domain="example.net", name="example.net").id Site.objects.clear_cache() - with self.assertRaises(TemplateDoesNotExist): - loader.get_template("copyright.html") + self.assertRaises(TemplateDoesNotExist, + loader.get_template, "copyright.html") finally: django_settings.SITE_ID = old_site_id settings.DBTEMPLATES_ADD_DEFAULT_SITE = old_add_default_site