Skip to content

Commit f04cf4d

Browse files
committed
Don't reuse sanitised service and orgs
1 parent 76a6b4b commit f04cf4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/functional_tests_fixtures/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,10 @@ def _create_user(name, email_address, password, auth_type="sms_auth", organisati
392392
def _create_organiation(email_domain, org_name):
393393
organisations = dao_get_organisations_by_partial_name(org_name)
394394

395+
# skip redacted org
395396
org = None
396397
for organisation in organisations:
397-
if organisation.name == org_name:
398+
if organisation.name == org_name and organisation.notes != "redacted":
398399
org = organisation
399400

400401
if org is None:
@@ -412,7 +413,7 @@ def _create_service(org_id, user, service_name="Functional Tests"):
412413

413414
service = None
414415
for s in services:
415-
if s.name == service_name and s.contact_link == current_app.config["ADMIN_BASE_URL"]:
416+
if s.name == service_name and s.notes != "redacted":
416417
service = s
417418

418419
if service is None:

0 commit comments

Comments
 (0)