diff --git a/flaskr/auth.py b/flaskr/auth.py index 5874e97..ad930fb 100644 --- a/flaskr/auth.py +++ b/flaskr/auth.py @@ -11,7 +11,7 @@ bp = Blueprint('auth', __name__, url_prefix='/auth') @bp.route('/register', methods=('GET', 'POST')) def register(): - return "Admin only", 403 + # return "Admin only", 403 if request.method == 'POST': username = request.form['username'] password = request.form['password'] diff --git a/tests/test_blog.py b/tests/test_blog.py index 2479428..deb52bc 100644 --- a/tests/test_blog.py +++ b/tests/test_blog.py @@ -58,7 +58,7 @@ def test_create(client, auth, app): def test_update(client, auth, app): auth.login() assert client.get('/1/update').status_code == 200 - client.post('/1/update', data={'title': 'updated', 'body': ''}) + client.post('/1/update', data={'title': 'updated', 'body': '', 'created': '1970-01-01 00:00:00'}) with app.app_context(): db = get_db() @@ -71,7 +71,7 @@ def test_update(client, auth, app): )) def test_create_update_validate(client, auth, path): auth.login() - response = client.post(path, data={'title': '', 'body': ''}) + response = client.post(path, data={'title': '', 'body': '', 'created': '1970-01-01 00:00:00'}) assert b'Title is required.' in response.data def test_delete(client, auth, app):