Skip to content

Commit 1977c5b

Browse files
committed
minor: rest old formatting
1 parent cfd4412 commit 1977c5b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/test_fields.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,17 +2059,17 @@ class TestMultipleChoiceField(FieldValues):
20592059
"""
20602060
valid_inputs = {
20612061
(): list(),
2062-
("aircon",): ["aircon"],
2063-
("aircon", "manual"): ["aircon", "manual"],
2064-
("manual", "aircon"): ["manual", "aircon"],
2062+
('aircon',): ['aircon'],
2063+
('aircon', 'manual'): ['aircon', 'manual'],
2064+
('manual', 'aircon'): ['manual', 'aircon'],
20652065
}
20662066
invalid_inputs = {
20672067
'abc': ['Expected a list of items but got type "str".'],
20682068
('aircon', 'incorrect'): ['"incorrect" is not a valid choice.']
20692069
}
20702070
outputs = [
2071-
(["aircon", "manual", "incorrect"], ["aircon", "manual", "incorrect"]),
2072-
(["manual", "aircon", "incorrect"], ["manual", "aircon", "incorrect"]),
2071+
(['aircon', 'manual', 'incorrect'], ['aircon', 'manual', 'incorrect']),
2072+
(['manual', 'aircon', 'incorrect'], ['manual', 'aircon', 'incorrect']),
20732073
]
20742074
field = serializers.MultipleChoiceField(
20752075
choices=[
@@ -2084,7 +2084,7 @@ def test_against_partial_and_full_updates(self):
20842084
field.partial = False
20852085
assert field.get_value(QueryDict('')) == []
20862086
field.partial = True
2087-
assert field.get_value(QueryDict("")) == rest_framework.fields.empty
2087+
assert field.get_value(QueryDict('')) == rest_framework.fields.empty
20882088

20892089
def test_valid_inputs_is_json_serializable(self):
20902090
for input_value, _ in get_items(self.valid_inputs):
@@ -2095,7 +2095,7 @@ def test_valid_inputs_is_json_serializable(self):
20952095
except TypeError as e:
20962096
assert (
20972097
False
2098-
), f"Validated output not JSON serializable: {repr(validated)}; Error: {e}"
2098+
), f'Validated output not JSON serializable: {repr(validated)}; Error: {e}'
20992099

21002100
def test_output_is_json_serializable(self):
21012101
for output_value, _ in get_items(self.outputs):
@@ -2105,8 +2105,8 @@ def test_output_is_json_serializable(self):
21052105
json.dumps(representation)
21062106
except TypeError as e:
21072107
assert False, (
2108-
f"to_representation output not JSON serializable: "
2109-
f"{repr(representation)}; Error: {e}"
2108+
f'to_representation output not JSON serializable: '
2109+
f'{repr(representation)}; Error: {e}'
21102110
)
21112111

21122112

0 commit comments

Comments
 (0)