From 51585f6290876356a99a8f2a1eb15eafcba83e04 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 6 Apr 2020 11:41:14 +0200 Subject: [PATCH] tests: remove warning on Element.getchildren() (#41302) --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 7299d84..d15e052 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -158,7 +158,7 @@ def test_binary_data(app, partner_southpark, cut_kevin_uuid, acl): assert resp.headers.get('Content-Type') == content_type xml_data = etree.fromstring(resp.content) assert xml_data.tag == 'friends' - assert len(xml_data.getchildren()) == 4 + assert len(list(xml_data)) == 4 # test update by changing format payload = {"friends": [{"name": "Token", "age": 10}, {"name": "Kenny", "age": 10}]}