Skip to content

Commit 3f311b2

Browse files
author
Louis Rannou
committed
tests: prepare for json format
The structure of data changes a bit Signed-off-by: Louis Rannou <[email protected]>
1 parent 7fe9cee commit 3f311b2

File tree

2 files changed

+246
-260
lines changed

2 files changed

+246
-260
lines changed

test/test_importer.py

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,39 +1868,37 @@ def mocked_get_release_by_id(
18681868
}
18691869

18701870
return {
1871-
"release": {
1872-
"title": releases[id_][0],
1873-
"id": id_,
1874-
"medium-list": [
1875-
{
1876-
"track-list": [
1877-
{
1878-
"id": "baz",
1879-
"recording": {
1880-
"title": "foo",
1881-
"id": "bar",
1882-
"length": 59,
1883-
},
1884-
"position": 9,
1885-
"number": "A2",
1886-
}
1887-
],
1888-
"position": 5,
1889-
}
1890-
],
1891-
"artist-credit": [
1892-
{
1893-
"artist": {
1894-
"name": releases[id_][1],
1895-
"id": "some-id",
1896-
},
1897-
}
1898-
],
1899-
"release-group": {
1900-
"id": "another-id",
1901-
},
1902-
"status": "Official",
1903-
}
1871+
"title": releases[id_][0],
1872+
"id": id_,
1873+
"media": [
1874+
{
1875+
"tracks": [
1876+
{
1877+
"id": "baz",
1878+
"recording": {
1879+
"title": "foo",
1880+
"id": "bar",
1881+
"length": 59,
1882+
},
1883+
"position": 9,
1884+
"number": "A2",
1885+
}
1886+
],
1887+
"position": 5,
1888+
}
1889+
],
1890+
"artist-credit": [
1891+
{
1892+
"artist": {
1893+
"name": releases[id_][1],
1894+
"id": "some-id",
1895+
},
1896+
}
1897+
],
1898+
"release-group": {
1899+
"id": "another-id",
1900+
},
1901+
"status": "Official",
19041902
}
19051903

19061904

0 commit comments

Comments
 (0)