Fixed a bug in testing for directory existence in the test setup.

- Legacy-Id: 12185
This commit is contained in:
Henrik Levkowetz 2016-10-19 22:38:28 +00:00
parent e1f0477ec8
commit 27cd21155c

View file

@ -204,10 +204,10 @@ class TestWikiGlueManagementCommand(TestCase):
def setUp(self): def setUp(self):
self.wiki_dir_pattern = os.path.abspath('tmp-wiki-dir-root/%s') self.wiki_dir_pattern = os.path.abspath('tmp-wiki-dir-root/%s')
if not os.path.exists(self.wiki_dir_pattern): if not os.path.exists(os.path.dirname(self.wiki_dir_pattern)):
os.mkdir(os.path.dirname(self.wiki_dir_pattern)) os.mkdir(os.path.dirname(self.wiki_dir_pattern))
self.svn_dir_pattern = os.path.abspath('tmp-svn-dir-root/%s') self.svn_dir_pattern = os.path.abspath('tmp-svn-dir-root/%s')
if not os.path.exists(self.svn_dir_pattern): if not os.path.exists(os.path.dirname(self.svn_dir_pattern)):
os.mkdir(os.path.dirname(self.svn_dir_pattern)) os.mkdir(os.path.dirname(self.svn_dir_pattern))
def tearDown(self): def tearDown(self):