From 21b49e425dd943c3b460219fcb47feec833267de Mon Sep 17 00:00:00 2001 From: Agata Date: Mon, 21 Dec 2020 23:45:46 +0100 Subject: [PATCH] added 2nd test --- win_venv/tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/win_venv/tests.py b/win_venv/tests.py index aa92acb..937b23c 100644 --- a/win_venv/tests.py +++ b/win_venv/tests.py @@ -1,5 +1,7 @@ import unittest from main import * +from unittest.mock import Mock +from pathlib import Path # test saving file class savingFileTest(unittest.TestCase): @@ -21,6 +23,18 @@ class savingFileTest(unittest.TestCase): self.assertEqual(old_file_content, new_file_content) + +# test using mock checking if a file with analysis had been generated +class generetingOutputFile(unittest.TestCase): + def test_output_file(self): + + print('Moock testing outputfile') + m = Mock() + m.output_file_path = scriptPath + '\\files\\output\\test.pdf' + + assert Path(m.output_file_path).is_file() + + if __name__ == '__main__': unittest.main() \ No newline at end of file