1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 20:59:41 +00:00

Reorganize test

This commit is contained in:
Emma 2019-06-23 11:11:32 -06:00
parent d37f51b168
commit 6233b089cf

View file

@ -65,6 +65,10 @@ def test_update(client, app):
with client.session_transaction() as session: with client.session_transaction() as session:
flash_message = dict(session['_flashes']).get('error') flash_message = dict(session['_flashes']).get('error')
assert flash_message is None 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 # Test response without valid/conflicted rev
response = client.post('/recipes/update/{}'.format(id), response = client.post('/recipes/update/{}'.format(id),
@ -74,10 +78,6 @@ def test_update(client, app):
flash_message = dict(session['_flashes']).get('error') flash_message = dict(session['_flashes']).get('error')
assert 'Update conflict' in flash_message assert 'Update conflict' in flash_message
with app.app_context():
updated = get_doc(id)
assert updated['name'] == data['name']
def test_info(client): def test_info(client):
"""Test success in retrieving a recipe document.""" """Test success in retrieving a recipe document."""