Skip to content

Commit

Permalink
linting fix (#2681)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlm6693 authored May 20, 2022
1 parent 7496d16 commit 92247f6
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/unit/test_awsrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,30 +276,29 @@ def seek(self, where):
([(None, None)], 'http://example.com/?None=None'),
(
[('foo', 'bar'), ('foo', 'baz'), ('fizz', 'buzz')],
'http://example.com/?foo=bar&foo=baz&fizz=buzz'
'http://example.com/?foo=bar&foo=baz&fizz=buzz',
),
(
[('foo', 'bar'), ('foo', None)],
'http://example.com/?foo=bar&foo=None',
),
([('foo', 'bar'), ('foo', None)], 'http://example.com/?foo=bar&foo=None'),
([('foo', 'bar')], 'http://example.com/?foo=bar'),
(
[('foo', 'bar'), ('foo', 'bar'), ('fizz', 'buzz')],
'http://example.com/?foo=bar&foo=bar&fizz=buzz'
'http://example.com/?foo=bar&foo=bar&fizz=buzz',
),
([('', 'bar')], 'http://example.com/?=bar'),
([(1, 'bar')], 'http://example.com/?1=bar'),
]
],
)
def test_can_use_list_tuples_for_params(test_input, expected_output):
request = AWSRequest(
url='http://example.com/', params=test_input
)
request = AWSRequest(url='http://example.com/', params=test_input)
prepared_request = request.prepare()
assert prepared_request.url == expected_output


def test_empty_list_tuples_value_error_for_params():
request = AWSRequest(
url='http://example.com/', params=[()]
)
request = AWSRequest(url='http://example.com/', params=[()])
with pytest.raises(ValueError):
request.prepare()

Expand Down

0 comments on commit 92247f6

Please sign in to comment.