Skip to content

Commit da47df1

Browse files
committed
fix tests
1 parent e878d0f commit da47df1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/oauth/test_base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ async def test_oauth_with_fastapi(mocker):
9090
response = client.get('/shopify/auth')
9191
assert response.status_code == 422
9292
response_json = response.json()
93-
# the url will change according to the pydantic version installed
94-
del response_json['detail'][0]['url']
9593
assert response_json == {
9694
'detail': [
9795
{'input': None, 'loc': ['query', 'shop'], 'msg': 'Field required', 'type': 'missing'}

tests/token_classes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ class MockHTTPResponse(BaseModel):
3636
jsondata: Optional[dict] = None
3737
headers: dict = {'X-Shopify-Shop-Api-Call-Limit': '39/40'}
3838

39-
def json(self):
39+
def json(self): # type: ignore[override]
4040
# Mock trying to deserialize something that's not a valid JSON
4141
if self.jsondata is None:
42-
loads('NOT A JSON')
43-
return self.jsondata
42+
loads('Not a JSON')
43+
return self.jsondata # type: ignore[return-value]
4444

4545

4646
class TestInformation(BaseModel):

0 commit comments

Comments
 (0)