first try with fixture for login

This commit is contained in:
2025-07-02 11:36:51 +02:00
parent d3e9eda937
commit 90cae5ffc9
3 changed files with 45 additions and 0 deletions

17
tests/conftest.py Normal file
View File

@@ -0,0 +1,17 @@
import pytest
from server import app
EMAIL1 = "admin@irontemple.com"
EMAIL2 = "john@simplylift.co"
@pytest.fixture
def client():
with app.test_client() as client:
yield client
@pytest.fixture
def connect(client):
response = client.post('/showSummary', data={"email": EMAIL})
soup = BeautifulSoup(response.data, 'html.parser')