use imported List

fail test if non-existing dir exists

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes
2022-04-01 12:38:14 +02:00
parent 537bec2eeb
commit d0e39edfbe
2 changed files with 6 additions and 4 deletions

View File

@@ -313,7 +313,7 @@ class TestTasks(DirectoriesMixin, TestCase):
)
nonexistingdir = "/nowhere"
if os.path.isdir(nonexistingdir):
self.skipTest("non-existing dir exists")
self.fail("non-existing dir exists")
else:
with self.assertLogs("paperless.tasks", level="WARNING") as cm:
tasks.save_to_dir(test_file, target_dir=nonexistingdir)