diff options
Diffstat (limited to 'test/test_dodai.py')
-rw-r--r-- | test/test_dodai.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/test_dodai.py b/test/test_dodai.py new file mode 100644 index 0000000..a521a38 --- /dev/null +++ b/test/test_dodai.py | |||
@@ -0,0 +1,38 @@ | |||
1 | # Copyright (C) 2010 Leonard Thomas | ||
2 | # | ||
3 | # This file is part of Dodai. | ||
4 | # | ||
5 | # Dodai is free software: you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation, either version 3 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # Dodai is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with Dodai. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | import unittest | ||
19 | import os | ||
20 | from dodai import Configure | ||
21 | |||
22 | class TestConfigure(unittest.TestCase): | ||
23 | |||
24 | def setUp(self): | ||
25 | path = os.path.dirname(os.path.abspath(__file__)) | ||
26 | path = os.path.join(path, 'config') | ||
27 | filename = os.path.join(path, 'connection') | ||
28 | self.filename = filename | ||
29 | self.obj = Configure('test', config_files=[filename]) | ||
30 | |||
31 | def test_results(self): | ||
32 | files = self.obj.config_files | ||
33 | self.assertTrue(len(files) == 1) | ||
34 | |||
35 | def test_add_files(self): | ||
36 | self.obj._add_files(self.filename) | ||
37 | files = self.obj.config_files | ||
38 | self.assertTrue(len(files) == 1) | ||