-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ruff instead of black as formatter (#3656)
- Loading branch information
1 parent
02c7166
commit 17673de
Showing
211 changed files
with
988 additions
and
1,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ class Test_Schema_Request_Cookies: | |
|
||
def setup_request_method(self): | ||
self.request = weblog.get( | ||
"/tag_value/api_match_AS001/200", cookies={"secret": "any_value", "cache": "any_other_value"}, | ||
"/tag_value/api_match_AS001/200", cookies={"secret": "any_value", "cache": "any_other_value"} | ||
) | ||
|
||
@missing_feature(context.library < "[email protected]") | ||
|
@@ -150,7 +150,7 @@ def test_request_method(self): | |
"""can provide request request body schema""" | ||
schema = get_schema(self.request, "req.body") | ||
assert self.request.status_code == 200 | ||
assert contains(schema, [{"main": [[[{"key": [8], "value": [16]}]], {"len": 2}], "nullable": [1]}],) | ||
assert contains(schema, [{"main": [[[{"key": [8], "value": [16]}]], {"len": 2}], "nullable": [1]}]) | ||
|
||
|
||
@rfc("https://docs.google.com/document/d/1OCHPBCAErOL2FhLl64YAHB8woDyq66y5t-JGolxdf1Q/edit#heading=h.bth088vsbjrz") | ||
|
@@ -176,8 +176,8 @@ def test_request_method(self): | |
schema = get_schema(self.request, "req.body") | ||
assert self.request.status_code == 200 | ||
assert ( | ||
contains(schema, [{"main": [[[{"key": [8], "value": [8]}]], {"len": 2}], "nullable": [8]}],) | ||
or contains(schema, [{"main": [[[{"key": [8], "value": [16]}]], {"len": 2}], "nullable": [1]}],) | ||
contains(schema, [{"main": [[[{"key": [8], "value": [8]}]], {"len": 2}], "nullable": [8]}]) | ||
or contains(schema, [{"main": [[[{"key": [8], "value": [16]}]], {"len": 2}], "nullable": [1]}]) | ||
or contains( | ||
schema, | ||
[ | ||
|
@@ -221,7 +221,7 @@ class Test_Schema_Response_Body: | |
def setup_request_method(self): | ||
self.request = weblog.post( | ||
"/tag_value/payload_in_response_body_001/200", | ||
data={"test_int": 1, "test_str": "anything", "test_bool": True, "test_float": 1.5234,}, | ||
data={"test_int": 1, "test_str": "anything", "test_bool": True, "test_float": 1.5234}, | ||
) | ||
|
||
def test_request_method(self): | ||
|
@@ -250,7 +250,7 @@ class Test_Schema_Response_Body_env_var: | |
def setup_request_method(self): | ||
self.request = weblog.post( | ||
"/tag_value/payload_in_response_body_001/200?X-option=test_value", | ||
data={"test_int": 1, "test_str": "anything", "test_bool": True, "test_float": 1.5234,}, | ||
data={"test_int": 1, "test_str": "anything", "test_bool": True, "test_float": 1.5234}, | ||
) | ||
|
||
def test_request_method(self): | ||
|
@@ -276,8 +276,8 @@ class Test_Scanners: | |
def setup_request_method(self): | ||
self.request = weblog.get( | ||
"/tag_value/api_match_AS001/200", | ||
cookies={"mastercard": "5123456789123456", "authorization": "digest_a0b1c2", "SSN": "123-45-6789",}, | ||
headers={"authorization": "digest a0b1c2",}, | ||
cookies={"mastercard": "5123456789123456", "authorization": "digest_a0b1c2", "SSN": "123-45-6789"}, | ||
headers={"authorization": "digest a0b1c2"}, | ||
) | ||
|
||
@missing_feature(context.library < "[email protected]") | ||
|
@@ -294,7 +294,7 @@ def test_request_method(self): | |
{ | ||
"SSN": [8, {"category": "pii", "type": "us_ssn"}], | ||
"authorization": [8], | ||
"mastercard": [8, {"card_type": "mastercard", "type": "card", "category": "payment"},], | ||
"mastercard": [8, {"card_type": "mastercard", "type": "card", "category": "payment"}], | ||
}, | ||
{ | ||
"SSN": [[[8, {"category": "pii", "type": "us_ssn"}]], {"len": 1}], | ||
|
@@ -311,7 +311,6 @@ def test_request_method(self): | |
(schema_cookies[0], EXPECTED_COOKIES), | ||
(schema_headers[0], EXPECTED_HEADERS), | ||
]: | ||
|
||
for key in expected[0]: | ||
assert key in schema | ||
assert isinstance(schema[key], list) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.