Add organisations model and create dao

This commit is contained in:
Ken Tsang
2017-07-04 17:02:28 +01:00
parent a01163d719
commit c743e52fe8
5 changed files with 72 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
import pytest
from app.dao.organisations_dao import dao_create_organisation
from app.models import Organisation
from tests.app.db import create_organisation
def test_create_organisation(notify_db, notify_db_session):
organisation = create_organisation()
assert Organisation.query.count() == 1
organisation_from_db = Organisation.query.first()
assert organisation == organisation_from_db