Fix all test files lint errors.
This commit is contained in:
@@ -25,7 +25,8 @@ def get_file_content(static_file_directory, file_name):
|
||||
return file.read()
|
||||
|
||||
|
||||
@pytest.mark.parametrize('file_name', ['test.file', 'decode me.txt', 'python.png'])
|
||||
@pytest.mark.parametrize('file_name',
|
||||
['test.file', 'decode me.txt', 'python.png'])
|
||||
def test_static_file(app, static_file_directory, file_name):
|
||||
app.static(
|
||||
'/testing.file', get_file_path(static_file_directory, file_name))
|
||||
@@ -364,8 +365,8 @@ def test_static_content_range_empty(app, file_name, static_file_directory):
|
||||
assert response.status == 200
|
||||
assert 'Content-Length' in response.headers
|
||||
assert 'Content-Range' not in response.headers
|
||||
assert int(response.headers[
|
||||
'Content-Length']) == len(get_file_content(static_file_directory, file_name))
|
||||
assert int(response.headers['Content-Length']) == \
|
||||
len(get_file_content(static_file_directory, file_name))
|
||||
assert response.body == bytes(
|
||||
get_file_content(static_file_directory, file_name))
|
||||
|
||||
@@ -384,8 +385,8 @@ def test_static_content_range_empty(app, file_name, static_file_directory):
|
||||
assert response.status == 200
|
||||
assert 'Content-Length' in response.headers
|
||||
assert 'Content-Range' not in response.headers
|
||||
assert int(response.headers[
|
||||
'Content-Length']) == len(get_file_content(static_file_directory, file_name))
|
||||
assert int(response.headers['Content-Length']) == \
|
||||
len(get_file_content(static_file_directory, file_name))
|
||||
assert response.body == bytes(
|
||||
get_file_content(static_file_directory, file_name))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user