@bdd.then(bdd.parsers.parse('the json on the page should be:\n{text}'))
def check_contents_json(quteproc, text):
 content = quteproc.get_content().strip()
 expected = json.loads(text)
 actual = json.loads(content)
 assert (actual == expected)

@ bdd . then ( bdd . parsers . parse ( 'the json on the page should be:\n{text}' ) ) def check_contents_json ( quteproc , text ) : content = quteproc . get_content ( ) . strip ( ) expected = json . loads ( text ) actual = json . loads ( content ) assert ( actual == expected )
check the current pages content as json .