Commit 3b538a44 authored by Michal Čihař's avatar Michal Čihař

Test non existing dirs as well

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 8acca44e
......@@ -397,8 +397,10 @@ class SearchMigrationTest(TestCase):
weblate.trans.search.STORAGE = self.backup
def do_test(self, source, target):
self.storage.create_index(source, 'source')
self.storage.create_index(target, 'target-cs')
if source is not None:
self.storage.create_index(source, 'source')
if target is not None:
self.storage.create_index(target, 'target-cs')
self.assertIsNotNone(
weblate.trans.search.get_source_index()
......@@ -407,6 +409,13 @@ class SearchMigrationTest(TestCase):
weblate.trans.search.get_target_index('cs')
)
def test_nonexisting(self):
self.do_test(None, None)
def test_nonexisting_dir(self):
shutil.rmtree(self.path)
self.do_test(None, None)
def test_current(self):
source = weblate.trans.search.SourceSchema
target = weblate.trans.search.TargetSchema
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment