summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2017-06-09 21:31:45 +0300
committerGitHub <noreply@github.com>2017-06-09 21:31:45 +0300
commit77d37bf6ed02efacd94483ebc6ff35241bc3a0a0 (patch)
tree075d09023ee067085cdc1b84c06d48ccbf44dca6
parentd6ac5857f3b896e7e2e94aa7e4a369b915a6b8a8 (diff)
parent1c412f889c0fcc087b726069ff91f69ecfae8e88 (diff)
downloadbottle-77d37bf6ed02efacd94483ebc6ff35241bc3a0a0.tar.gz
Merge pull request #919 from kianxineki/patch-6
Receiving a code other than 2xx generate exception
-rwxr-xr-xdocs/recipes.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/recipes.rst b/docs/recipes.rst
index ce0f1e7..3e0a490 100755
--- a/docs/recipes.rst
+++ b/docs/recipes.rst
@@ -121,11 +121,11 @@ Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose <http://rea
assert app.get('/admin').status == '200 OK' # fetch a page successfully
- app.get('/logout') # log out
+ assert app.get('/logout').status_code = 200 # log out
app.reset() # drop the cookie
# fetch the same page, unsuccessfully
- assert app.get('/admin').status == '401 Unauthorized'
+ assert app.get('/admin', expect_errors=True).status == '401 Unauthorized'
Embedding other WSGI Apps