mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-27 11:19:56 -04:00
Renamed migration script and refactor code
This commit is contained in:
@@ -39,7 +39,7 @@ from app.dao.invited_user_dao import save_invited_user
|
||||
from app.dao.provider_rates_dao import create_provider_rates
|
||||
from app.clients.sms.firetext import FiretextClient
|
||||
from tests import create_authorization_header
|
||||
from tests.app.db import create_user, create_template, create_notification, create_organisation
|
||||
from tests.app.db import create_user, create_template, create_notification
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
@@ -974,10 +974,6 @@ def sample_provider_rate(notify_db, notify_db_session, valid_from=None, rate=Non
|
||||
)
|
||||
|
||||
|
||||
def sample_organisation(notify_db, notify_db_session):
|
||||
create_organisation()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def restore_provider_details(notify_db, notify_db_session):
|
||||
"""
|
||||
|
||||
@@ -35,12 +35,14 @@ def test_create_organisation_without_logo_raises_error(notify_db, notify_db_sess
|
||||
|
||||
|
||||
def test_get_organisations_gets_all_organisations(notify_db, notify_db_session):
|
||||
create_organisation(name='test_org_1')
|
||||
create_organisation(name='test_org_2')
|
||||
org_1 = create_organisation(name='test_org_1')
|
||||
org_2 = create_organisation(name='test_org_2')
|
||||
|
||||
organisations = dao_get_organisations()
|
||||
|
||||
assert len(organisations) == 2
|
||||
assert org_1 == organisations[0]
|
||||
assert org_2 == organisations[1]
|
||||
|
||||
|
||||
def test_get_organisation_by_id_gets_correct_organisation(notify_db, notify_db_session):
|
||||
|
||||
Reference in New Issue
Block a user