Commit 895bc4f4 by Clinton Blackburn

Added email and name attributes to UserFactory

The UserFactory now generates an email address and name—full, first, and last—for every user.

ECOM-5929
parent 3b4d913f
...@@ -13,6 +13,10 @@ class UserFactory(factory.DjangoModelFactory): ...@@ -13,6 +13,10 @@ class UserFactory(factory.DjangoModelFactory):
is_active = True is_active = True
is_superuser = False is_superuser = False
is_staff = False is_staff = False
email = factory.Faker('email')
first_name = factory.Faker('first_name')
last_name = factory.Faker('last_name')
full_name = factory.LazyAttribute(lambda user: ' '.join((user.first_name, user.last_name)))
class Meta: class Meta:
model = User model = User
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment