@bdd.then(bdd.parsers.parse('The unordered requests should be:\n{pages}'))
def list_of_requests_unordered(httpbin, pages):
 expected_requests = [httpbin.ExpectedRequest('GET', ('/' + path.strip())) for path in pages.split('\n')]
 actual_requests = httpbin.get_requests()
 actual_requests = [httpbin.ExpectedRequest.from_request(req) for req in actual_requests]
 assert (collections.Counter(actual_requests) == collections.Counter(expected_requests))

@ bdd . then ( bdd . parsers . parse ( 'The unordered requests should be:\n{pages}' ) ) def list_of_requests_unordered ( httpbin , pages ) : expected_requests = [ httpbin . ExpectedRequest ( 'GET' , ( '/' + path . strip ( ) ) ) for path in pages . split ( '\n' ) ] actual_requests = httpbin . get_requests ( ) actual_requests = [ httpbin . ExpectedRequest . from_request ( req ) for req in actual_requests ] assert ( collections . Counter ( actual_requests ) == collections . Counter ( expected_requests ) )
make sure the given requests were done .