first try with fixture for login
This commit is contained in:
17
tests/conftest.py
Normal file
17
tests/conftest.py
Normal 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')
|
||||
|
||||
Reference in New Issue
Block a user