More test fixes

This commit is contained in:
kevgliss 2015-07-22 20:32:29 -07:00
parent 412d2a1bbe
commit 49c7421591
2 changed files with 4 additions and 3 deletions

View File

@ -176,8 +176,9 @@ def delete(model):
:param model:
"""
db.session.delete(model)
db.session.commit()
if model:
db.session.delete(model)
db.session.commit()
def filter(query, model, terms):

View File

@ -78,7 +78,7 @@ def test_admin_destination_put(client):
def test_admin_destination_delete(client):
assert client.delete(api.url_for(Destinations, destination_id=1), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 500
assert client.delete(api.url_for(Destinations, destination_id=1), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 200
def test_admin_destination_patch(client):