Skip to content

Commit 5542005

Browse files
committed
Fix various linting errors in the tests
1 parent f7018bc commit 5542005

13 files changed

+16
-24
lines changed

tests/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,6 @@ def test_create_xml_soap_map():
196196
<value xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:date">2016-01-14</value>
197197
</item>
198198
</document>
199-
""" # noqa
199+
""" # noqa
200200
node = render_node(value._xsd_type, value)
201201
assert_nodes_equal(expected, node)

tests/test_pprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_dict():
1111
'foo': '1',
1212
'bar': {
1313
'bala': 'qwe',
14-
},
14+
},
1515
'x': [1, 2, 3, 4],
1616
'y': [],
1717
}

tests/test_soap_multiref.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def test_parse_multiref_soap_response():
135135
assert result.item_2.subitem_2 == 'bar'
136136

137137

138-
139138
@pytest.mark.requests
140139
def test_parse_multiref_soap_response_child():
141140
wsdl_file = io.StringIO(u"""

tests/test_soap_xop.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def test_rebuild_xml():
5757
wsdl=stub(strict=True),
5858
xml_huge_tree=False)
5959

60-
6160
decoder = MultipartDecoder(
6261
response.content, response.headers['Content-Type'], 'utf-8')
6362

@@ -79,11 +78,6 @@ def test_rebuild_xml():
7978
assert_nodes_equal(etree.tostring(document), expected)
8079

8180

82-
83-
84-
85-
86-
8781
def test_xop():
8882
wsdl_main = StringIO("""
8983
<?xml version="1.0"?>
@@ -238,8 +232,8 @@ def test_xop():
238232
print(response1)
239233
with requests_mock.mock() as m:
240234
m.post('http://tests.python-zeep.org/test',
241-
content=response2.encode("utf-8"),
242-
headers={"Content-Type": content_type})
235+
content=response2.encode("utf-8"),
236+
headers={"Content-Type": content_type})
243237
result = service.TestOperation2("")
244238
assert result["_value_1"] == "BINARYDATA".encode()
245239

tests/test_xsd.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ def test_invalid_kwarg_simple_type():
149149
elm(something='is-wrong')
150150

151151

152-
153-
154152
def test_any():
155153
some_type = xsd.Element(
156154
etree.QName('http://tests.python-zeep.org/', 'doei'),

tests/test_xsd_any.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def get_any_schema():
2626
"""))
2727

2828

29-
3029
def test_default_xsd_type():
3130
schema = xsd.Schema(load_xml("""
3231
<?xml version="1.0"?>
@@ -272,6 +271,7 @@ def test_element_any_type():
272271
item = container_elm.parse(node.getchildren()[0], schema)
273272
assert item.something == 'bar'
274273

274+
275275
def test_element_any_type_unknown_type():
276276
node = etree.fromstring("""
277277
<?xml version="1.0"?>

tests/test_xsd_indicators_choice.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def test_choice_element_second_elm():
9696
assert value.item_2 == 'foo'
9797
assert value.item_3 is None
9898

99+
99100
def test_choice_element_second_elm_positional():
100101
node = etree.fromstring("""
101102
<?xml version="1.0"?>

tests/test_xsd_indicators_sequence.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def test_build_min_occurs_2_max_occurs_2():
8181

8282
assert custom_type.signature()
8383

84-
8584
elm = custom_type(_value_1=[
8685
{'item_1': 'foo-1', 'item_2': 'bar-1'},
8786
{'item_1': 'foo-2', 'item_2': 'bar-2'},

tests/test_xsd_parse.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ def test_sequence_parse_anytype_regression_17():
198198
assert result.getCustomFieldReturn.value.content == 'Test Solution'
199199

200200

201-
202201
def test_nested_complex_type():
203202
custom_type = xsd.Element(
204203
etree.QName('http://tests.python-zeep.org/', 'authentication'),
@@ -324,13 +323,13 @@ def test_nested_choice_optional():
324323
etree.QName('http://tests.python-zeep.org/', 'item_1'),
325324
xsd.String()),
326325
xsd.Choice([
327-
xsd.Element(
328-
'{http://tests.python-zeep.org/}item_2',
329-
xsd.String()),
330-
xsd.Element(
331-
'{http://tests.python-zeep.org/}item_3',
332-
xsd.String()),
333-
],
326+
xsd.Element(
327+
'{http://tests.python-zeep.org/}item_2',
328+
xsd.String()),
329+
xsd.Element(
330+
'{http://tests.python-zeep.org/}item_3',
331+
xsd.String()),
332+
],
334333
min_occurs=0, max_occurs=1
335334
),
336335
])

tests/test_xsd_schemas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ def test_include_different_form_defaults():
776776
""")
777777
assert_nodes_equal(expected, node)
778778

779+
779780
def test_merge():
780781
node_a = etree.fromstring("""
781782
<?xml version="1.0"?>

0 commit comments

Comments
 (0)