Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
93c371fe
Verified
Commit
93c371fe
authored
Feb 04, 2020
by
Eliot Berriot
Browse files
Fixed failing test due to ordered dicts in python 3.8
parent
c116fa21
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/subsonic/renderers.py
View file @
93c371fe
...
...
@@ -7,10 +7,10 @@ import funkwhale_api
def
structure_payload
(
data
):
payload
=
{
"funkwhaleVersion"
:
funkwhale_api
.
__version__
,
"status"
:
"ok"
,
"version"
:
"1.16.0"
,
"type"
:
"funkwhale"
,
"
funkwhaleVersion"
:
funkwhale_api
.
__version__
,
"
version"
:
"1.16.0"
,
}
payload
.
update
(
data
)
if
"detail"
in
payload
:
...
...
api/tests/subsonic/test_renderers.py
View file @
93c371fe
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment