-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
57 lines (40 loc) · 1.71 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import unittest
from config import Config
import os
class TestConfig(unittest.TestCase):
config = Config()
def test_config_load(self):
""" Test that config.py loads completely """
self.assertRaises(Exception, self.config)
def test_input_filename(self):
""" Test that input_filename returns the correct value"""
expected = os.path.abspath("test.pdf")
actual = self.config.input_filename
self.assertEqual(expected, actual, 'does not match')
def test_output_filename(self):
""" Test that output_filename returns the correct value"""
expected = "pdf_crop_merge.pdf"
actual = self.config.output_filename
self.assertEqual(expected, actual, 'does not match')
def test_filter(self):
""" Test that input_filename returns the correct value"""
expected = "Commercial Invoice"
actual = self.config.filter
self.assertEqual(expected, actual, 'does not match')
def test_suffix(self):
""" Test that the suffix returns the correct value"""
expected = "crop"
actual = self.config.suffix
self.assertEqual(expected, actual, 'does not match')
def test_directory(self):
""" Test that directory returns the correct value"""
expected = "/home/chris/Desktop/Shipping Labels/"
actual = self.config.directory
self.assertEqual(expected, actual, 'does not match')
def test_archived_directory(self):
""" Test that archived directory returns the correct value"""
expected = "Archived"
actual = self.config.archived_directory
self.assertEqual(expected, actual, 'does not match')
if __name__ == '__main__':
unittest.main()