Loading tests/regression-14.feature +1 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,6 @@ Feature: Return 404 for unknown path Examples: | suffix | result | | / | OK | | / | 301 | | /0 | OK | | /foo | Not Found | tests/steps/request_steps.py +6 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ class ResponseCode(int, PatternEnum): """ ok = 200 moved_permanently = 301 found = 302 not_modified = 304 temporary_redirect = 307 permanent_redirect = 308 not_found = 404 # Aliases for the above codes, for mapping natural language in feature files to enums Loading Loading @@ -58,7 +63,7 @@ def get_request(context: Context, url: URL) -> None: """ Assign the response from making a GET request to "url" to the context """ context.response = context.session.get(context.site.url / url) context.response = context.session.get(context.site.url / url, allow_redirects=False) @when("the homepage is requested") Loading Loading
tests/regression-14.feature +1 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,6 @@ Feature: Return 404 for unknown path Examples: | suffix | result | | / | OK | | / | 301 | | /0 | OK | | /foo | Not Found |
tests/steps/request_steps.py +6 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ class ResponseCode(int, PatternEnum): """ ok = 200 moved_permanently = 301 found = 302 not_modified = 304 temporary_redirect = 307 permanent_redirect = 308 not_found = 404 # Aliases for the above codes, for mapping natural language in feature files to enums Loading Loading @@ -58,7 +63,7 @@ def get_request(context: Context, url: URL) -> None: """ Assign the response from making a GET request to "url" to the context """ context.response = context.session.get(context.site.url / url) context.response = context.session.get(context.site.url / url, allow_redirects=False) @when("the homepage is requested") Loading