mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 18:19:42 +00:00
Reorganize test
This commit is contained in:
parent
d37f51b168
commit
6233b089cf
1 changed files with 4 additions and 4 deletions
|
|
@ -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."""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue