diff options
author | Fernando Borretti <eudoxiahp@gmail.com> | 2015-01-15 19:22:48 -0200 |
---|---|---|
committer | Fernando Borretti <eudoxiahp@gmail.com> | 2015-01-15 19:22:48 -0200 |
commit | af49632c0321b9334b9b4c721f21e9317065115b (patch) | |
tree | d51fb395b05acca89e66d6958bffb97ff0920ee8 | |
parent | 298fecb3a843dee32d24ff15df05df7383da7b73 (diff) | |
download | paperbot-af49632c0321b9334b9b4c721f21e9317065115b.tar.gz paperbot-af49632c0321b9334b9b4c721f21e9317065115b.zip |
Style fixes to the unit tests
-rw-r--r-- | tests/basetestcase.py | 1 | ||||
-rw-r--r-- | tests/test_ezproxy.py | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/basetestcase.py b/tests/basetestcase.py index dfe3f1f..b6df546 100644 --- a/tests/basetestcase.py +++ b/tests/basetestcase.py @@ -1,4 +1,5 @@ import unittest + class BaseTestCase(unittest.TestCase): pass diff --git a/tests/test_ezproxy.py b/tests/test_ezproxy.py index a3d1cdc..c17a55c 100644 --- a/tests/test_ezproxy.py +++ b/tests/test_ezproxy.py @@ -10,6 +10,7 @@ from paperbot.ezproxy import ( load_ezproxy_config, ) + class EzproxyTestCases(BaseTestCase): def test_load_ezproxy_config_path_does_not_exist(self): with mock.patch("os.path.exists", return_value=False) as ospathexists: @@ -19,13 +20,16 @@ class EzproxyTestCases(BaseTestCase): @mock.patch("os.path.exists", return_value=True) @mock.patch("os.listdir", return_value=["test.json"]) @mock.patch("paperbot.ezproxy.load_json_file", return_value={}) - def test_load_ezproxy_config_calls_file_reader(self, load_json_file, oslistdir, ospathexists): + def test_load_ezproxy_config_calls_file_reader(self, load_json_file, + oslistdir, ospathexists): load_ezproxy_config() self.assertTrue(load_json_file.called) @mock.patch("os.path.exists", return_value=True) @mock.patch("paperbot.ezproxy.load_json_file", return_value={}) - def test_load_ezproxy_config_bails_on_no_json_filename(self, load_json_file, ospathexists): + def test_load_ezproxy_config_bails_on_no_json_filename(self, + load_json_file, + ospathexists): with mock.patch("os.listdir", return_value=["something.xml"]): output = load_ezproxy_config() @@ -46,7 +50,8 @@ class EzproxyTestCases(BaseTestCase): }, } - with mock.patch("paperbot.ezproxy.load_json_file", return_value=testjson): + with mock.patch("paperbot.ezproxy.load_json_file", + return_value=testjson): output = load_ezproxy_config() # should still be a dictionary result |