refactor: update methods to include show_sender parameter and clean up tests

This commit is contained in:
bohd4nx
2026-03-14 01:34:51 +02:00
parent 6c869428aa
commit 4e017cb7a1
11 changed files with 26 additions and 52 deletions
-13
View File
@@ -1,13 +0,0 @@
"""End-to-end integration test: buy 50 Stars for @bohd4nx.
Requires cookies.json and a valid .env (API_KEY + SEED).
Auto-skipped when cookies or config are unavailable (e.g. CI without secrets).
"""
from app.methods.stars import buy_stars
async def test_buy_stars_e2e(cookies, tests_config):
result = await buy_stars("@bohd4nx", 50)
assert result["success"] is True, result.get("error")
assert result["data"]["transaction_id"]
-9
View File
@@ -1,6 +1,5 @@
import pytest
from app.core.config import config
from app.core.cookies import load_cookies
from app.core.exceptions import CookiesError
@@ -12,11 +11,3 @@ def cookies():
return load_cookies()
except CookiesError as exc:
pytest.skip(f"Cookies unavailable — {exc}")
@pytest.fixture
def tests_config():
"""Require a fully configured environment (SEED + API_KEY); skip otherwise."""
if config is None:
pytest.skip("Config unavailable — set SEED and API_KEY in .env or environment")
return config