Fixed failing test due to ordered dicts in python 3.8

This commit is contained in:
Eliot Berriot 2020-02-04 11:49:58 +01:00
parent c116fa21c9
commit 93c371fe75
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
2 changed files with 4 additions and 4 deletions

View File

@ -7,10 +7,10 @@ import funkwhale_api
def structure_payload(data):
payload = {
"status": "ok",
"version": "1.16.0",
"type": "funkwhale",
"funkwhaleVersion": funkwhale_api.__version__,
"status": "ok",
"type": "funkwhale",
"version": "1.16.0",
}
payload.update(data)
if "detail" in payload:

View File

@ -80,7 +80,7 @@ def test_xml_renderer_dict_to_xml():
def test_xml_renderer():
payload = {"hello": "world"}
expected = '<?xml version="1.0" encoding="UTF-8"?>\n<subsonic-response funkwhaleVersion="{}" hello="world" status="ok" type="funkwhale" version="1.16.0" xmlns="http://subsonic.org/restapi" />' # noqa
expected = '<?xml version="1.0" encoding="UTF-8"?>\n<subsonic-response funkwhaleVersion="{}" status="ok" type="funkwhale" version="1.16.0" hello="world" xmlns="http://subsonic.org/restapi" />' # noqa
expected = expected.format(funkwhale_api.__version__).encode()
renderer = renderers.SubsonicXMLRenderer()