diff options
author | Oz Tiram <oz.tiram@noris.de> | 2019-09-07 21:58:25 +0200 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2019-12-01 20:13:07 +0100 |
commit | 977b589b4fb5a7032c188e583e7ce3f1a6fa38e2 (patch) | |
tree | a73951c0c3a62d37190298b6fbb650c29c37df1f | |
parent | 7eb0af28c89d38dd2f860ec75718664e6b9f362d (diff) | |
download | bottle-977b589b4fb5a7032c188e583e7ce3f1a6fa38e2.tar.gz |
Fix syntax in login-login recipe
Previously, the example yielded SyntaxError. Adding an equal sign
fixes the assertion syntax.
-rwxr-xr-x | docs/recipes.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/recipes.rst b/docs/recipes.rst index 2ad6cda..cfda5ba 100755 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -116,12 +116,12 @@ Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose <http://rea def test_functional_login_logout(): app = TestApp(mywebapp.app) - + app.post('/login', {'user': 'foo', 'pass': 'bar'}) # log in and get a cookie assert app.get('/admin').status == '200 OK' # fetch a page successfully - assert app.get('/logout').status_code = 200 # log out + assert app.get('/logout').status_code == 200 # log out app.reset() # drop the cookie # fetch the same page, unsuccessfully |