Skip to content

Commit

Permalink
tests: Adjust to new oleobj output
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-intra2net committed Nov 28, 2022
1 parent 8bf957f commit 3d441a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/oleobj/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ def preread_file(args):
raise ValueError('ignore_arg not as expected!')
with open(filename, 'rb') as file_handle:
data = file_handle.read()
err_stream, err_dumping, did_dump = \
err_stream, err_dumping, did_dump, found_external = \
oleobj.process_file(filename, data, output_dir=output_dir)
if did_dump and not err_stream and not err_dumping:
if did_dump and not err_stream and not err_dumping and not found_external:
return oleobj.RETURN_DID_DUMP
else:
return oleobj.RETURN_NO_DUMP # just anything else
return oleobj.RETURN_NO_DUMP # just anything else, will cause error


class TestOleObj(unittest.TestCase):
""" Tests oleobj basic feature """
"""Tests oleobj basic feature: dump embedded content."""

def setUp(self):
""" fixture start: create temp dir """
Expand Down
2 changes: 1 addition & 1 deletion tests/oleobj/test_external_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_external_links(self):

output, ret_val = call_and_capture('oleobj', ['--nodump', file_path, ],
accept_nonzero_exit=True)
self.assertEqual(ret_val, oleobj.RETURN_DID_DUMP,
self.assertEqual(ret_val, oleobj.RETURN_FOUND_EXTERNAL,
msg='Wrong return value {} for {}. Output:\n{}'
.format(ret_val, filename, output))
found_relationship = False
Expand Down

0 comments on commit 3d441a5

Please sign in to comment.