mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-19 20:54:12 +02:00
Bug Fixes & Automated Testing - remove_failed_imports.py #patch
This commit is contained in:
33
tests/jobs/remove_failed_imports/mock_data/mock_data_1.json
Normal file
33
tests/jobs/remove_failed_imports/mock_data/mock_data_1.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"records": [
|
||||
{
|
||||
"id": 1,
|
||||
"downloadId": "A123",
|
||||
"title": "Sonarr Title 1",
|
||||
"status": "completed",
|
||||
"trackedDownloadStatus": "ok",
|
||||
"trackedDownloadState": "importing",
|
||||
"statusMessages": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"downloadId": "B123",
|
||||
"title": "Sonarr Title 2",
|
||||
"status": "completed",
|
||||
"trackedDownloadStatus": "warning",
|
||||
"trackedDownloadState": "importBlocked",
|
||||
"statusMessages": [
|
||||
{
|
||||
"title": "One or more episodes expected in this release were not imported or missing from the release",
|
||||
"messages": []
|
||||
},
|
||||
{
|
||||
"title": "Sonarr Title 2.mkv",
|
||||
"messages": [
|
||||
"Episode XYZ was not found in the grabbed release: Sonarr Title 2.mkv"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
32
tests/jobs/remove_failed_imports/mock_data/mock_data_2.json
Normal file
32
tests/jobs/remove_failed_imports/mock_data/mock_data_2.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"records": [
|
||||
{
|
||||
"id": 1,
|
||||
"downloadId": "A123",
|
||||
"title": "Sonarr Title 1",
|
||||
"status": "completed",
|
||||
"trackedDownloadStatus": "warning",
|
||||
"trackedDownloadState": "importBlocked",
|
||||
"statusMessages": [
|
||||
{
|
||||
"title": "First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Duplicate of First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Second of Message",
|
||||
"messages": [
|
||||
"Message 2 - goodbye all"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
60
tests/jobs/remove_failed_imports/mock_data/mock_data_3.json
Normal file
60
tests/jobs/remove_failed_imports/mock_data/mock_data_3.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"records": [
|
||||
{
|
||||
"id": 1,
|
||||
"downloadId": "A123",
|
||||
"title": "Sonarr Title 1",
|
||||
"status": "completed",
|
||||
"trackedDownloadStatus": "warning",
|
||||
"trackedDownloadState": "importPending",
|
||||
"statusMessages": [
|
||||
{
|
||||
"title": "First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Duplicate of First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Second of Message",
|
||||
"messages": [
|
||||
"Message 2 - goodbye all"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"downloadId": "B123",
|
||||
"title": "Sonarr Title 2",
|
||||
"status": "completed",
|
||||
"trackedDownloadStatus": "warning",
|
||||
"trackedDownloadState": "importFailed",
|
||||
"statusMessages": [
|
||||
{
|
||||
"title": "First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Duplicate of First Message",
|
||||
"messages": [
|
||||
"Message 1 - hello world"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Second of Message",
|
||||
"messages": [
|
||||
"Message 2 - goodbye all"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user