Set default session cookie name.
This commit is contained in:
@ -5,4 +5,4 @@ Feature: Session
|
||||
Scenario: Session ID is set
|
||||
Given a running server
|
||||
When the home page is accessed
|
||||
Then there is a session id
|
||||
Then there is a default session id
|
||||
|
@ -19,7 +19,13 @@ def access_home_page(server, page):
|
||||
page.request_url(url)
|
||||
|
||||
|
||||
@then("there is a session id")
|
||||
@then("there is a default session id")
|
||||
def confirm_session(page):
|
||||
"""Confirm session id exists."""
|
||||
assert len(page.get_cookies()), "No cookies received."
|
||||
cookies = page.get_cookies()
|
||||
name = "morethantext.sid"
|
||||
cookie = None
|
||||
for holder in cookies:
|
||||
if holder.name == name:
|
||||
cookie = holder
|
||||
assert cookie, f"Did not find cookie {name}, but retrieved {cookies}"
|
||||
|
Reference in New Issue
Block a user