mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Don’t let domains have none values
This commit is contained in:
@@ -223,7 +223,7 @@ acas.org.uk:
|
|||||||
owner: Advisory, Conciliation and Arbitration Service
|
owner: Advisory, Conciliation and Arbitration Service
|
||||||
crown: true
|
crown: true
|
||||||
agreement_signed: false
|
agreement_signed: false
|
||||||
charitycommission.gsi.gov.uk:
|
charitycommission.gsi.gov.uk: charitycommission.gov.uk
|
||||||
charitycommission.gov.uk:
|
charitycommission.gov.uk:
|
||||||
owner: Charity Commission
|
owner: Charity Commission
|
||||||
crown: true
|
crown: true
|
||||||
@@ -257,7 +257,7 @@ hse.gov.uk:
|
|||||||
owner: Health and Safety Executive
|
owner: Health and Safety Executive
|
||||||
crown: true
|
crown: true
|
||||||
agreement_signed: false
|
agreement_signed: false
|
||||||
hmtreasury.gsi.gov.uk:
|
hmtreasury.gsi.gov.uk: hmtreasury.gov.uk
|
||||||
hmtreasury.gov.uk:
|
hmtreasury.gov.uk:
|
||||||
owner: HM Treasury
|
owner: HM Treasury
|
||||||
crown: true
|
crown: true
|
||||||
@@ -5122,7 +5122,7 @@ wyrebc.gov.uk:
|
|||||||
owner: Wyre Borough Council
|
owner: Wyre Borough Council
|
||||||
crown: false
|
crown: false
|
||||||
agreement_signed: false
|
agreement_signed: false
|
||||||
wyreforestdc.gov.uk:
|
wyreforestdc.gov.uk: wyreforest.gov.uk
|
||||||
wyreforest.gov.uk:
|
wyreforest.gov.uk:
|
||||||
owner: Wyre Forest District Council
|
owner: Wyre Forest District Council
|
||||||
crown: false
|
crown: false
|
||||||
|
|||||||
@@ -563,10 +563,10 @@ class AgreementInfo:
|
|||||||
|
|
||||||
def _get_info(self):
|
def _get_info(self):
|
||||||
|
|
||||||
details = self.domains.get(self._match)
|
details = self.domains.get(self._match, {})
|
||||||
|
|
||||||
if isinstance(details, None):
|
if details is None:
|
||||||
raise TypeError('Domain must have details ({})'.format(self._match))
|
raise TypeError('Domain must have details ({})'.format(self._domain))
|
||||||
|
|
||||||
if isinstance(details, str):
|
if isinstance(details, str):
|
||||||
self.is_canonical = False
|
self.is_canonical = False
|
||||||
|
|||||||
@@ -403,11 +403,7 @@ def test_validate_government_domain_data():
|
|||||||
True, False, None
|
True, False, None
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (
|
assert isinstance(agreement_info.owner, str) and agreement_info.owner.strip()
|
||||||
agreement_info.owner is None
|
|
||||||
) or (
|
|
||||||
isinstance(agreement_info.owner, str)
|
|
||||||
)
|
|
||||||
|
|
||||||
assert agreement_info.agreement_signed in {
|
assert agreement_info.agreement_signed in {
|
||||||
True, False, None
|
True, False, None
|
||||||
|
|||||||
Reference in New Issue
Block a user