added 2nd test
This commit is contained in:
parent
467f8e5578
commit
21b49e425d
@ -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()
|
Loading…
Reference in New Issue
Block a user