diff --git a/README.md b/README.md index 1e530b2..a642e38 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ print(credentials) { 'access_token': '', 'refresh_token': '', - 'user_id': '', 'cookie': '', } ``` @@ -62,7 +61,7 @@ print(credentials) ```python from tgtg import TgtgClient -client = TgtgClient(access_token="", refresh_token="", user_id="", cookie="") +client = TgtgClient(access_token="", refresh_token="", cookie="") ``` @@ -434,7 +433,6 @@ print(order) { "id": "", "item_id": "", - "user_id": "", "state": "RESERVED", "order_line": { "quantity": 1, @@ -483,7 +481,6 @@ print(order_status) { "id": "", "item_id": "", - "user_id": "", "state": "RESERVED" } ``` diff --git a/tests/conftest.py b/tests/conftest.py index 4374751..4bcfc27 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,8 +31,7 @@ def auth_polling_response(): urljoin(BASE_URL, AUTH_POLLING_ENDPOINT), json={ "access_token": "an_access_token", - "refresh_token": "a_refresh_token", - "startup_data": {"user": {"user_id": 1234}}, + "refresh_token": "a_refresh_token" }, status=200, ) diff --git a/tests/constants.py b/tests/constants.py index 1d9f6c8..f1b9854 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -59,6 +59,5 @@ tgtg_client_fake_tokens = { "access_token": "access_token", "refresh_token": "refresh_token", - "user_id": "user_id", "cookie": "cookie", } diff --git a/tests/test_login.py b/tests/test_login.py index 941b434..88aa451 100644 --- a/tests/test_login.py +++ b/tests/test_login.py @@ -88,21 +88,10 @@ def test_login_empty_fail(): TgtgClient().login() -def test_login_empty_token_fail(): - with pytest.raises(TypeError): - TgtgClient(user_id=1234).login() - - -def test_login_empty_user_id_fail(): - with pytest.raises(TypeError): - TgtgClient(access_token="test_token", refresh_token="test_refres_toekn").login() - - def test_get_credentials(client): assert client.get_credentials() == { "access_token": "an_access_token", "cookie": "sweet sweet cookie", "refresh_token": "a_refresh_token", - "user_id": "user_id", } diff --git a/tests/test_signup.py b/tests/test_signup.py index afe167f..fd402ab 100644 --- a/tests/test_signup.py +++ b/tests/test_signup.py @@ -15,7 +15,6 @@ def test_signup_ok(): "login_response": { "access_token": "an_access_token", "refresh_token": "a_refresh_token", - "startup_data": {"user": {"user_id": 1234}}, } }, status=200, @@ -23,8 +22,7 @@ def test_signup_ok(): client = TgtgClient().signup_by_email(email="test@test.com") assert client.access_token == "an_access_token" assert client.refresh_token == "a_refresh_token" - assert client.user_id == 1234 - +\ def test_signup_fail(): responses.add( diff --git a/tgtg/__init__.py b/tgtg/__init__.py index 0288dee..fe3886b 100644 --- a/tgtg/__init__.py +++ b/tgtg/__init__.py @@ -290,7 +290,6 @@ def get_favorites( data = { "origin": {"latitude": latitude, "longitude": longitude}, "radius": radius, - "user_id": self.user_id, "paging": {"page": page, "size": page_size}, "bucket": {"filler_type": "Favorites"}, }