From 71134f97e395fbbea0a58cd130a691b5886aca21 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 17 Nov 2015 06:41:58 +0100 Subject: [PATCH] bdd: Wait for request with "... should be loaded". Hopefully makes things less prone to race conditions. --- tests/integration/features/conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index cf96a0c76..b9428802f 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -98,8 +98,7 @@ def wait_for_message(quteproc, httpbin, category, message): @bdd.then(bdd.parsers.parse("{path} should be loaded")) def path_should_be_loaded(httpbin, path): - requests = httpbin.get_requests() - assert requests[-1] == httpbin.ExpectedRequest('GET', '/' + path) + httpbin.wait_for(verb='GET', path='/' + path) @bdd.then(bdd.parsers.parse("The requests should be:\n{pages}"))