1
0
mirror of https://github.com/httpie/cli.git synced 2026-06-20 11:32:56 +02:00

Fix several issues found with flake8 (#1081)

This commit is contained in:
Mickaël Schoentgen
2021-06-01 14:46:58 +02:00
committed by GitHub
parent 8374a9ed83
commit 8d35a12d27
10 changed files with 18 additions and 17 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ SOURCE_DIRECTORIES = [
def has_docutils():
try:
# noinspection PyUnresolvedReferences,PyPackageRequirements
import docutils
import docutils # noqa
return True
except ImportError:
return False
@@ -35,7 +35,7 @@ def rst_filenames():
os.chdir(cwd)
filenames = list(sorted(rst_filenames()))
filenames = sorted(rst_filenames())
assert filenames
+1 -1
View File
@@ -130,7 +130,7 @@ def test_form_POST_file_redirected_stdin(httpbin):
<https://github.com/httpie/httpie/issues/840>
"""
with open(FILE_PATH) as f:
with open(FILE_PATH):
r = http(
'--form',
'POST',
-1
View File
@@ -4,7 +4,6 @@ from unittest import mock
import json
import os
import tempfile
import io
from urllib.request import urlopen
+1 -1
View File
@@ -479,7 +479,7 @@ class TestCookieStorage(CookieTestBase):
2. command line arg
3. cookie already stored in session file
"""
r = http(
http(
'--session', str(self.session_path),
httpbin.url + set_cookie,
'Cookie:' + cli_cookie,
-3
View File
@@ -1,6 +1,3 @@
import os
import tempfile
import pytest
from httpie.context import Environment
+4 -4
View File
@@ -69,19 +69,19 @@ def test_assert_output_matches_body_and_separator():
def test_assert_output_matches_body_r():
assert_output_matches(f'AAA\r', [Expect.BODY])
assert_output_matches('AAA\r', [Expect.BODY])
def test_assert_output_matches_body_n():
assert_output_matches(f'AAA\n', [Expect.BODY])
assert_output_matches('AAA\n', [Expect.BODY])
def test_assert_output_matches_body_r_body():
assert_output_matches(f'AAA\rBBB', [Expect.BODY])
assert_output_matches('AAA\rBBB', [Expect.BODY])
def test_assert_output_matches_body_n_body():
assert_output_matches(f'AAA\nBBB', [Expect.BODY])
assert_output_matches('AAA\nBBB', [Expect.BODY])
def test_assert_output_matches_headers_and_body():