Fixed a messy test case (regressiontests/templates/loaders) that could cause future tests to fail by not cleaning up after itself.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d53e8f1285
commit
08d468db92
|
@ -59,8 +59,12 @@ class EggLoader(unittest.TestCase):
|
||||||
'templates/y.html' : StringIO.StringIO("y"),
|
'templates/y.html' : StringIO.StringIO("y"),
|
||||||
'templates/x.txt' : StringIO.StringIO("x"),
|
'templates/x.txt' : StringIO.StringIO("x"),
|
||||||
})
|
})
|
||||||
|
self._old_installed_apps = settings.INSTALLED_APPS
|
||||||
settings.INSTALLED_APPS = []
|
settings.INSTALLED_APPS = []
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
settings.INSTALLED_APPS = self._old_installed_apps
|
||||||
|
|
||||||
def test_empty(self):
|
def test_empty(self):
|
||||||
"Loading any template on an empty egg should fail"
|
"Loading any template on an empty egg should fail"
|
||||||
settings.INSTALLED_APPS = ['egg_empty']
|
settings.INSTALLED_APPS = ['egg_empty']
|
||||||
|
|
Loading…
Reference in New Issue