ARver/tests/data/discs/j2wJHXA1xXZj7Wkh_tKm4vLjqBk-.json
arcctgx 0cdc5e1937 avoid sending requests to MusicBrainz in tests
get_releases_by_discid() returns release data in JSON format, so this
data can be easily stored in a file. Store information about several
discs as test data, and mock get_releases_by_discid() calls to return
test release data loaded from JSON files.

Change one of the discs used in test: its disc ID began with a period,
so its JSON file would be hidden. The new disc has the maximum number
of tracks possible in an audio CD (in addition to a pregap).

Remove assertion for checking if the returned object is not None. This
won't happen if the test is not sending requests to MusicBrainz anymore.

Avoiding network overhead makes the test execute almost instantly
instead of taking a few seconds. I'm still not sure about the idea
of this test - it seems to me that it doesn't actually test very much.
2024-03-18 22:00:01 +01:00

150 lines
No EOL
2.4 KiB
JSON

{
"disc": {
"id": "j2wJHXA1xXZj7Wkh_tKm4vLjqBk-",
"sectors": "333596",
"offset-list": [
150,
123375,
131930,
140961,
149299,
168189,
177170,
188023,
199274,
208755,
218170,
227172,
236945,
245838,
255523,
266774,
275152,
284303,
294203,
296001,
296616,
297372,
301823,
302764,
306951,
307551,
308151,
308751,
313729,
314380,
314980,
315610,
316243,
316979,
317579,
318179,
318844,
319444,
320064,
320707,
321307,
321907,
327904
],
"offset-count": 43,
"release-list": [
{
"id": "a3432424-b964-4ebf-a876-793a60e519bd",
"title": "Heroes of Might and Magic II",
"status": "Promotion",
"quality": "normal",
"text-representation": {
"language": "eng",
"script": "Latn"
},
"date": "2001-01",
"country": "PL",
"release-event-list": [
{
"date": "2001-01",
"area": {
"id": "dd7f80c8-f017-3d01-8608-2a8c9c32b954",
"name": "Poland",
"sort-name": "Poland",
"iso-3166-1-code-list": [
"PL"
]
}
}
],
"release-event-count": 1,
"barcode": "",
"cover-art-archive": {
"artwork": "true",
"count": "1",
"front": "false",
"back": "false"
},
"medium-list": [
{
"position": "1",
"format": "Mixed Mode CD",
"disc-list": [
{
"id": "j2wJHXA1xXZj7Wkh_tKm4vLjqBk-",
"sectors": "333596",
"offset-list": [
150,
123375,
131930,
140961,
149299,
168189,
177170,
188023,
199274,
208755,
218170,
227172,
236945,
245838,
255523,
266774,
275152,
284303,
294203,
296001,
296616,
297372,
301823,
302764,
306951,
307551,
308151,
308751,
313729,
314380,
314980,
315610,
316243,
316979,
317579,
318179,
318844,
319444,
320064,
320707,
321307,
321907,
327904
],
"offset-count": 43
}
],
"disc-count": 1,
"track-list": [],
"track-count": 43
}
],
"medium-count": 1
}
],
"release-count": 1
}
}