Skip to content

Commit dd5bf24

Browse files
committed
Add tests
1 parent 922428d commit dd5bf24

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
11.4 KB
Binary file not shown.

tests/test_packages.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from pprint import pprint # noqa
33

4-
from .support import TestCase
4+
from tests.support import TestCase
55

66

77
class PackagesTest(TestCase):
@@ -22,3 +22,12 @@ def test_tar(self):
2222
self.manager.ingest(fixture_path, entity)
2323
self.assertEqual(entity.first("processingStatus"), self.manager.STATUS_SUCCESS)
2424
self.assertEqual(entity.schema.name, "Package")
25+
26+
def test_password_protected_7z(self):
27+
fixture_path, entity = self.fixture("500_pages_password.7z")
28+
self.manager.ingest(fixture_path, entity)
29+
self.assertEqual(entity.first("processingStatus"), self.manager.STATUS_FAILURE)
30+
self.assertEqual(
31+
entity.get("processingError")[0],
32+
"Could not unpack the contents of this file. The document might be protected with a password. Try removing the password protection and re-uploading the documents.",
33+
)

0 commit comments

Comments
 (0)