|
8 | 8 | from delphi.epidata.acquisition.flusurv.flusurv import fetch_json |
9 | 9 |
|
10 | 10 | # py3tester coverage target |
11 | | -__test_target__ = 'delphi.epidata.acquisition.flusurv.flusurv' |
| 11 | +__test_target__ = "delphi.epidata.acquisition.flusurv.flusurv" |
12 | 12 |
|
13 | 13 |
|
14 | 14 | class FunctionTests(unittest.TestCase): |
15 | | - """Tests each function individually.""" |
| 15 | + """Tests each function individually.""" |
16 | 16 |
|
17 | | - def test_fetch_json(self): |
18 | | - """Run through a successful flow.""" |
| 17 | + def test_fetch_json(self): |
| 18 | + """Run through a successful flow.""" |
19 | 19 |
|
20 | | - path = 'path' |
21 | | - payload = None |
| 20 | + path = "path" |
| 21 | + payload = None |
22 | 22 |
|
23 | | - response_object = MagicMock() |
24 | | - response_object.status_code = 200 |
25 | | - response_object.headers = {'Content-Type': 'application/json'} |
26 | | - response_object.json.return_value = sentinel.expected |
| 23 | + response_object = MagicMock() |
| 24 | + response_object.status_code = 200 |
| 25 | + response_object.headers = {"Content-Type": "application/json"} |
| 26 | + response_object.json.return_value = sentinel.expected |
27 | 27 |
|
28 | | - requests_impl = MagicMock() |
29 | | - requests_impl.get.return_value = response_object |
| 28 | + requests_impl = MagicMock() |
| 29 | + requests_impl.get.return_value = response_object |
30 | 30 |
|
31 | | - actual = fetch_json(path, payload, requests_impl=requests_impl) |
| 31 | + actual = fetch_json(path, payload, requests_impl=requests_impl) |
32 | 32 |
|
33 | | - self.assertEqual(actual, sentinel.expected) |
| 33 | + self.assertEqual(actual, sentinel.expected) |
0 commit comments