mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-03-16 22:20:28 +00:00
Stop using a context manager when we don't need it really.
This commit is contained in:
parent
222c7947d2
commit
d3ccb0c42a
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue