Stop using a context manager when we don't need it really.

This commit is contained in:
Jannis Leidel 2012-05-07 09:04:31 +02:00
parent 222c7947d2
commit d3ccb0c42a

View file

@ -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