diff --git a/tests/test_recipes.py b/tests/test_recipes.py index 120a686..cc40215 100644 --- a/tests/test_recipes.py +++ b/tests/test_recipes.py @@ -65,6 +65,10 @@ def test_update(client, app): with client.session_transaction() as session: flash_message = dict(session['_flashes']).get('error') assert flash_message is None + # Validate document update + with app.app_context(): + updated = get_doc(id) + assert updated['name'] == data['name'] # Test response without valid/conflicted rev response = client.post('/recipes/update/{}'.format(id), @@ -74,10 +78,6 @@ def test_update(client, app): flash_message = dict(session['_flashes']).get('error') assert 'Update conflict' in flash_message - with app.app_context(): - updated = get_doc(id) - assert updated['name'] == data['name'] - def test_info(client): """Test success in retrieving a recipe document."""