Commit e1d0f24 1 parent 7628193 commit e1d0f24 Copy full SHA for e1d0f24
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2
2
import pathlib
3
3
import re
4
4
from os import environ
5
+ from urllib .parse import urljoin
5
6
6
7
import pytest
7
8
import responses
8
9
from pytest_mock .plugin import MockerFixture
9
10
10
11
from tgtg_scanner .models import Config
11
- from tgtg_scanner .tgtg .tgtg_client import USER_AGENTS , TgtgClient
12
+ from tgtg_scanner .tgtg .tgtg_client import (
13
+ BASE_URL ,
14
+ FAVORITE_ITEM_ENDPOINT ,
15
+ USER_AGENTS ,
16
+ TgtgClient ,
17
+ )
12
18
13
19
14
20
def test_get_latest_apk_version ():
@@ -159,7 +165,7 @@ def test_tgtg_set_favorite(mocker: MockerFixture):
159
165
item_id = "12345"
160
166
responses .add (
161
167
responses .POST ,
162
- f"https://apptoogoodtogo.com/api/item/v8/ { item_id } /setFavorite" ,
168
+ urljoin ( BASE_URL , FAVORITE_ITEM_ENDPOINT . format ( item_id )) ,
163
169
json .dumps ({"is_favorite" : True }),
164
170
status = 200 ,
165
171
)
You can’t perform that action at this time.
0 commit comments