From 054df14e5f777937229eae3c49093d6a64e26ad3 Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Mon, 4 Mar 2019 09:58:15 -0800 Subject: [PATCH 1/3] Fixed URLs for tests --- 5-logging/tests/test_auth.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/5-logging/tests/test_auth.py b/5-logging/tests/test_auth.py index 491de9e0..c6539c4c 100644 --- a/5-logging/tests/test_auth.py +++ b/5-logging/tests/test_auth.py @@ -59,7 +59,7 @@ def inner(): class TestAuth(object): def test_not_logged_in(self, app): with app.test_client() as c: - rv = c.get('/books/') + rv = c.get('/') assert rv.status == '200 OK' body = rv.data.decode('utf-8') @@ -67,7 +67,7 @@ def test_not_logged_in(self, app): def test_logged_in(self, client_with_credentials): with client_with_credentials() as c: - rv = c.get('/books/') + rv = c.get('/') assert rv.status == '200 OK' body = rv.data.decode('utf-8') @@ -79,7 +79,7 @@ def test_add_anonymous(self, app): } with app.test_client() as c: - rv = c.post('/books/add', data=data, follow_redirects=True) + rv = c.post('/add', data=data, follow_redirects=True) assert rv.status == '200 OK' body = rv.data.decode('utf-8') @@ -92,7 +92,7 @@ def test_add_logged_in(self, client_with_credentials): } with client_with_credentials() as c: - rv = c.post('/books/add', data=data, follow_redirects=True) + rv = c.post('/add', data=data, follow_redirects=True) assert rv.status == '200 OK' body = rv.data.decode('utf-8') @@ -115,7 +115,7 @@ def test_mine(self, model, client_with_credentials): # Check the "My Books" page and make sure only one of the books # appears. with client_with_credentials() as c: - rv = c.get('/books/mine') + rv = c.get('/mine') assert rv.status == '200 OK' body = rv.data.decode('utf-8') From 3310523e0ab3dd4ad9d0eb4a0d0e9729550d8c2c Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Mon, 4 Mar 2019 10:37:00 -0800 Subject: [PATCH 2/3] Fixed template names --- 5-logging/bookshelf/templates/base.html | 4 ++-- 5-logging/tests/test_auth.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/5-logging/bookshelf/templates/base.html b/5-logging/bookshelf/templates/base.html index 14935efa..1b304438 100644 --- a/5-logging/bookshelf/templates/base.html +++ b/5-logging/bookshelf/templates/base.html @@ -34,10 +34,10 @@