Skip to content
Snippets Groups Projects
Verified Commit 44e0ea44 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Fix ListProcessElements mock responses

parent c4d7e60d
No related branches found
No related tags found
1 merge request!2Port init elements code
Pipeline #165788 passed
...@@ -29,37 +29,49 @@ def test_run_process(use_cache, mock_worker): ...@@ -29,37 +29,49 @@ def test_run_process(use_cache, mock_worker):
"id": "11111111-1111-1111-1111-111111111111", "id": "11111111-1111-1111-1111-111111111111",
"type_id": "A", "type_id": "A",
"name": "Class 1", "name": "Class 1",
"image_id": "cafecafe-cafe-cafe-cafe-cafecafecafe",
"image_width": 42,
"image_height": 1337,
"image_url": "http://cafe",
"polygon": [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]],
"rotation_angle": 42,
"mirrored": False,
"confidence": None, "confidence": None,
**(
{
"image_id": "cafecafe-cafe-cafe-cafe-cafecafecafe",
"image_width": 42,
"image_height": 1337,
"image_url": "http://cafe",
"polygon": [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]],
"rotation_angle": 42,
"mirrored": False,
}
if mock_worker.use_cache
else {}
),
}, },
{ {
"id": "22222222-2222-2222-2222-222222222222", "id": "22222222-2222-2222-2222-222222222222",
"type_id": "A", "type_id": "A",
"name": "Class 2", "name": "Class 2",
"image_id": "beefbeef-beef-beef-beef-beefbeefbeef",
"image_width": 42,
"image_height": 1337,
"image_url": "http://beef",
"polygon": [[0, 0], [0, 2], [2, 2], [2, 0], [0, 0]],
"rotation_angle": 0,
"mirrored": True,
"confidence": None, "confidence": None,
**(
{
"image_id": "beefbeef-beef-beef-beef-beefbeefbeef",
"image_width": 42,
"image_height": 1337,
"image_url": "http://beef",
"polygon": [[0, 0], [0, 2], [2, 2], [2, 0], [0, 0]],
"rotation_angle": 0,
"mirrored": True,
}
if mock_worker.use_cache
else {}
),
}, },
{ {
"id": "33333333-3333-3333-3333-333333333333", "id": "33333333-3333-3333-3333-333333333333",
"type_id": "A", "type_id": "A",
"name": "Class 3", "name": "Class 3",
"rotation_angle": 17,
"mirrored": True,
"confidence": 0.42, "confidence": 0.42,
**( **(
{ {
"rotation_angle": 17,
"mirrored": True,
"image_id": None, "image_id": None,
"image_width": None, "image_width": None,
"image_height": None, "image_height": None,
...@@ -458,6 +470,7 @@ def test_not_enough_elements(mock_worker): ...@@ -458,6 +470,7 @@ def test_not_enough_elements(mock_worker):
"id": "22222222-2222-2222-2222-222222222222", "id": "22222222-2222-2222-2222-222222222222",
"type_id": "A", "type_id": "A",
"name": "Class 2", "name": "Class 2",
"confidence": 1.0,
} }
], ],
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment