Skip to content

Commit

Permalink
Fix AssertionError for test_media_info
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Mar 16, 2021
1 parent 669e5f8 commit 88bba14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ async def media_info(pk: int) -> Media:
return cl.media_info(pk)


@app.get("/", tags=["system"])
@app.get("/", tags=["system"], summary="Redirect to /docs")
async def root():
"""Redirect to /docs
"""
return RedirectResponse(url="/docs")


@app.get("/version", tags=["system"])
@app.get("/version", tags=["system"], summary="Get dependency versions")
async def version():
"""Return package versions
"""Get dependency versions
"""
versions = {}
for name in ('instagrapi', ):
Expand Down
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def test_media_info() -> None:
)
media = response.json()
assert response.status_code == 200
assert media["pk"] == "2110901750722920960"
assert media["pk"] == 2110901750722920960
assert media["id"] == "2110901750722920960_8572539084"
assert media["code"] == "B1LbfVPlwIA"
assert media["media_type"] == 1

0 comments on commit 88bba14

Please sign in to comment.