From e1d0f248c5fd572a60730872a563568283e16ce0 Mon Sep 17 00:00:00 2001 From: Henning Merklinger Date: Wed, 7 Feb 2024 22:42:36 +0100 Subject: [PATCH] updated tgtg set favorite test --- tests/test_tgtg.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_tgtg.py b/tests/test_tgtg.py index 5d217d56..b91751e4 100644 --- a/tests/test_tgtg.py +++ b/tests/test_tgtg.py @@ -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(): @@ -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, )