Skip to content

Commit

Permalink
Fix test after orjson removal
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdh committed Dec 13, 2021
1 parent b1def3d commit 4ccc838
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/profiles/test_mss.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from unittest.mock import MagicMock, AsyncMock

import orjson
import json
import pytest
from contextlib import asynccontextmanager

Expand Down Expand Up @@ -54,7 +54,7 @@ def create_es_mss_doc(doc):
es_doc = {'found': False}
else:
es_doc = {'found': True, '_source': doc}
return orjson.dumps(es_doc)
return json.dumps(es_doc)


@asynccontextmanager
Expand All @@ -63,7 +63,7 @@ async def mock_mss_profile(config, assoc_media_count, mss_doc, aps_is_ok):
1, ['collections'])

count_doc = {'count': assoc_media_count}
es_post_mock_response = AsyncMock(text=AsyncMock(return_value=orjson.dumps(count_doc)))
es_post_mock_response = AsyncMock(text=AsyncMock(return_value=json.dumps(count_doc)))
es_post_mock = AsyncMock(return_value=es_post_mock_response)

es_get_mock_response = AsyncMock(text=AsyncMock(return_value=create_es_mss_doc(mss_doc)))
Expand Down

0 comments on commit 4ccc838

Please sign in to comment.