From f38b87e9862814883bf8a3ad6b36d989d3097f86 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 21 Feb 2020 12:39:53 +0000 Subject: better primary email addresses --- ctrack/organisations/tests/factories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctrack/organisations') diff --git a/ctrack/organisations/tests/factories.py b/ctrack/organisations/tests/factories.py index daf86ad..d2e4730 100644 --- a/ctrack/organisations/tests/factories.py +++ b/ctrack/organisations/tests/factories.py @@ -90,7 +90,7 @@ class PersonFactory(DjangoModelFactory): first_name = Faker("first_name") last_name = Faker("last_name") organisation = SubFactory("ctrack.organisations.tests.factories.OrganisationFactory") - email = Faker("ascii_company_email") + email = factory.LazyAttribute(lambda o: '%s@%s.com' % (o.first_name.lower(), o.organisation.slug)) secondary_email = Faker("ascii_company_email") mobile = Faker("msisdn", locale="en_GB") landline = Faker("phone_number", locale="en_GB") -- cgit v1.2.3