Integrate pycodestyle

This commit is contained in:
Falco Duersch
2018-10-23 13:11:51 +02:00
committed by f4lco
parent 523cc8ba62
commit 57c75b02e5
12 changed files with 64 additions and 22 deletions
+6 -2
View File
@@ -21,7 +21,8 @@ def api_online_one_shot():
Subsequent API invocations will return with HTTP status code 500."""
def canned_menu(request, uri, response_headers):
path = os.path.join(os.path.dirname(__file__), 'resources', 'input.json')
path = os.path.join(os.path.dirname(__file__),
'resources', 'input.json')
with open(path) as f:
return 200, response_headers, f.read()
@@ -30,7 +31,10 @@ def api_online_one_shot():
httpretty.Response(body='invalid', status=500),
]
httpretty.register_uri(httpretty.POST, canteen_api.URL, responses=responses)
httpretty.register_uri(httpretty.POST,
canteen_api.URL,
responses=responses)
httpretty.enable(allow_net_connect=False)
yield httpretty
httpretty.disable()