Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai committed Mar 6, 2024
1 parent 5f1a32a commit d919b4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion app/dao/organisation_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

from app import db
from app.dao.dao_utils import transactional, version_class
from app.models import Domain, EmailBranding, InvitedOrganisationUser, Organisation, Service, User
from app.models import (
Domain,
EmailBranding,
InvitedOrganisationUser,
Organisation,
Service,
User,
)


def dao_get_organisations():
Expand Down
6 changes: 4 additions & 2 deletions tests/app/email_branding/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from tests.app.db import create_email_branding


def test_get_email_branding_options(admin_request, notify_db, notify_db_session):
email_branding1 = EmailBranding(colour="#FFFFFF", logo="/path/image.png", name="Org1")
def test_get_email_branding_options(admin_request, notify_db, notify_db_session, sample_organisation):
email_branding1 = EmailBranding(colour="#FFFFFF", logo="/path/image.png", name="Org1", organisation_id=sample_organisation.id)
email_branding2 = EmailBranding(colour="#000000", logo="/path/other.png", name="Org2")
notify_db.session.add_all([email_branding1, email_branding2])
notify_db.session.commit()
Expand All @@ -17,6 +17,8 @@ def test_get_email_branding_options(admin_request, notify_db, notify_db_session)
str(email_branding1.id),
str(email_branding2.id),
}
assert email_branding[0]["organisation_id"] == str(sample_organisation.id)
assert email_branding[1]["organisation_id"] == ""


def test_get_email_branding_by_id(admin_request, notify_db, notify_db_session):
Expand Down

0 comments on commit d919b4c

Please sign in to comment.