Merge pull request #2368 from alphagov/richer-orgs

Use ‘organisations‘ table to store info about organisations (not YAML)
This commit is contained in:
Chris Hill-Scott
2019-03-08 14:57:21 +00:00
committed by GitHub
9 changed files with 390 additions and 21 deletions

View File

@@ -52,7 +52,8 @@ from app.models import (
Complaint,
InvitedUser,
TemplateFolder,
LetterBranding
LetterBranding,
Domain,
)
@@ -506,6 +507,16 @@ def create_annual_billing(
return annual_billing
def create_domain(domain, organisation_id):
domain = Domain(domain=domain, organisation_id=organisation_id)
db.session.add(domain)
db.session.commit()
return domain
def create_organisation(name='test_org_1', active=True):
data = {
'name': name,