first try to get session cookie
This commit is contained in:
parent
90cae5ffc9
commit
b34382c46c
@ -1,5 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from server import app
|
from server import app
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
|
||||||
EMAIL1 = "admin@irontemple.com"
|
EMAIL1 = "admin@irontemple.com"
|
||||||
EMAIL2 = "john@simplylift.co"
|
EMAIL2 = "john@simplylift.co"
|
||||||
@ -12,6 +14,7 @@ def client():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def connect(client):
|
def connect(client):
|
||||||
response = client.post('/showSummary', data={"email": EMAIL})
|
response = client.post('/showSummary', data={"email": EMAIL1})
|
||||||
soup = BeautifulSoup(response.data, 'html.parser')
|
soup = BeautifulSoup(response.data, 'html.parser')
|
||||||
|
return soup
|
||||||
|
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
from flask import session
|
||||||
|
|
||||||
|
|
||||||
def test_should_not_when_try_more_points_than_available(connect):
|
def test_should_not_when_try_more_points_than_available(client):
|
||||||
print(response.data)
|
data = {"competition": "Spring Festival", "club": "Iron Temple", "places": "5"}
|
||||||
|
|
||||||
|
# response = client.post('/book/Spring%20Festival/Iron%20Temple', data=data)
|
||||||
|
response = client.post('/purchasePlaces', data=data)
|
||||||
|
# print(BeautifulSoup(response.data, "html.parser"))
|
||||||
|
print(session)
|
||||||
|
#assert "_flashes" in session
|
||||||
|
#assert session["_flashes"] == [("message", "You don't have enough points")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user