Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Mar 14, 2024
1 parent 7463c1b commit a178366
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/collections/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,7 @@ def test_post_200(self, index_expansion_concepts_task_mock):
response.data,
{
'id': ANY,
'task': ANY,
'state': 'PENDING',
'name': 'index_expansion_concepts_task_mock',
'queue': 'indexing',
Expand Down Expand Up @@ -3093,6 +3094,7 @@ def test_post_200(self, index_expansion_mappings_task_mock):
response.data,
{
'id': ANY,
'task': ANY,
'state': 'PENDING',
'name': 'index_expansion_mappings_task_mock',
'queue': 'indexing',
Expand Down
10 changes: 10 additions & 0 deletions core/importers/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ def test_get_without_task_id(self, ):
[dict(d) for d in response.data],
[{
'id': task_id1,
'task': task_id1,
'state': 'SUCCESS',
'name': 'core.common.tasks.bulk_import_parallel_inline',
'queue': 'priority',
Expand All @@ -1098,6 +1099,7 @@ def test_get_without_task_id(self, ):
sorted([dict(d) for d in response.data], key=lambda x: x['id']),
sorted([{
'id': task_id2,
'task': task_id2,
'state': 'FAILED',
'name': 'core.common.tasks.bulk_import_parallel_inline',
'queue': 'normal',
Expand All @@ -1110,6 +1112,7 @@ def test_get_without_task_id(self, ):
'children': []
}, {
'id': task_id3,
'task': task_id3,
'state': 'PENDING',
'name': 'core.common.tasks.bulk_import_parallel_inline',
'queue': 'pending',
Expand All @@ -1134,6 +1137,7 @@ def test_get_without_task_id(self, ):
[dict(d) for d in response.data],
[{
'id': task_id1,
'task': task_id1,
'state': 'SUCCESS',
'name': 'core.common.tasks.bulk_import_parallel_inline',
'queue': 'priority',
Expand Down Expand Up @@ -1181,6 +1185,7 @@ def test_get_task(self):
self.assertEqual(
response.data, {
'id': task_id,
'task': task_id,
'state': 'PENDING',
'name': 'core.common.tasks.bulk_import_parallel_inline',
'queue': 'normal',
Expand Down Expand Up @@ -1245,6 +1250,7 @@ def test_post_202(self, bulk_import_mock):
response.data,
{
'id': ANY,
'task': ANY,
'state': 'PENDING',
'name': 'bulk_import_parallel_inline',
'queue': 'bulk_import_root',
Expand Down Expand Up @@ -1278,6 +1284,7 @@ def test_post_202(self, bulk_import_mock):
response.data,
{
'id': task.id,
'task': task.id,
'state': 'PENDING',
'name': 'bulk_import_parallel_inline',
'queue': task.queue,
Expand Down Expand Up @@ -1308,6 +1315,7 @@ def test_post_202(self, bulk_import_mock):
response.data,
{
'id': task.id,
'task': task.id,
'state': 'PENDING',
'name': 'bulk_import_parallel_inline',
'queue': task.queue,
Expand Down Expand Up @@ -1382,6 +1390,7 @@ def test_post_inline_parallel_202(self, bulk_import_mock):
self.assertEqual(response.status_code, 202)
self.assertEqual(response.data, {
'id': ANY,
'task': ANY,
'state': 'PENDING',
'name': 'bulk_import_parallel_inline',
'queue': 'bulk_import_root',
Expand Down Expand Up @@ -1414,6 +1423,7 @@ def test_post_inline_202(self, bulk_import_mock):
self.assertEqual(response.status_code, 202)
self.assertEqual(response.data, {
'id': ANY,
'task': ANY,
'state': 'PENDING',
'name': 'bulk_import_inline',
'queue': 'bulk_import_root',
Expand Down

0 comments on commit a178366

Please sign in to comment.