mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-29 20:48:21 -04:00
Removed dao_update_organisation
This commit is contained in:
@@ -4,7 +4,7 @@ from sqlalchemy.exc import IntegrityError
|
||||
from app.dao.organisations_dao import (
|
||||
dao_create_organisation,
|
||||
dao_get_organisations,
|
||||
dao_get_organisation_by_id, dao_update_organisation
|
||||
dao_get_organisation_by_id
|
||||
)
|
||||
from app.models import Organisation
|
||||
|
||||
@@ -60,9 +60,8 @@ def test_update_organisation(notify_db, notify_db_session):
|
||||
organisation_from_db = Organisation.query.first()
|
||||
assert organisation_from_db.name != updated_name
|
||||
|
||||
organisation.name = updated_name
|
||||
setattr(organisation_from_db, 'name', updated_name)
|
||||
|
||||
dao_update_organisation(organisation)
|
||||
organisation_from_db = Organisation.query.first()
|
||||
organisation_from_db_again = Organisation.query.first()
|
||||
|
||||
assert organisation_from_db.name == updated_name
|
||||
assert organisation_from_db_again.name == updated_name
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_post_create_organisation_without_name_or_colour_is_valid(admin_request,
|
||||
|
||||
@pytest.mark.parametrize('data_update', [
|
||||
({'name': 'test organisation 1'}),
|
||||
({'logo': 'images/text_x3.png', 'colour': '#ffffff'})
|
||||
({'logo': 'images/text_x3.png', 'colour': '#ffffff'}),
|
||||
])
|
||||
def test_post_update_organisation_updates_field(admin_request, notify_db_session, data_update):
|
||||
data = {
|
||||
|
||||
Reference in New Issue
Block a user