Skip to content

Commit

Permalink
updated tgtg set favorite test
Browse files Browse the repository at this point in the history
  • Loading branch information
Der-Henning committed Feb 7, 2024
1 parent 7628193 commit e1d0f24
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_tgtg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
import pathlib
import re
from os import environ
from urllib.parse import urljoin

import pytest
import responses
from pytest_mock.plugin import MockerFixture

from tgtg_scanner.models import Config
from tgtg_scanner.tgtg.tgtg_client import USER_AGENTS, TgtgClient
from tgtg_scanner.tgtg.tgtg_client import (
BASE_URL,
FAVORITE_ITEM_ENDPOINT,
USER_AGENTS,
TgtgClient,
)


def test_get_latest_apk_version():
Expand Down Expand Up @@ -159,7 +165,7 @@ def test_tgtg_set_favorite(mocker: MockerFixture):
item_id = "12345"
responses.add(
responses.POST,
f"https://apptoogoodtogo.com/api/item/v8/{item_id}/setFavorite",
urljoin(BASE_URL, FAVORITE_ITEM_ENDPOINT.format(item_id)),
json.dumps({"is_favorite": True}),
status=200,
)
Expand Down

0 comments on commit e1d0f24

Please sign in to comment.