@bdd.then(bdd.parsers.parse('the cookie {name} should be set to {value}'))
def check_cookie(quteproc, name, value):
 content = quteproc.get_content()
 data = json.loads(content)
 print data
 assert (data['cookies'][name] == value)

@ bdd . then ( bdd . parsers . parse ( 'the cookie {name} should be set to {value}' ) ) def check_cookie ( quteproc , name , value ) : content = quteproc . get_content ( ) data = json . loads ( content ) print data assert ( data [ 'cookies' ] [ name ] == value )
check if a given cookie is set correctly .