user can update profile

This commit is contained in:
dandds
2018-10-15 15:30:15 -04:00
parent ec7504fb20
commit f3c3332127
4 changed files with 45 additions and 3 deletions

View File

@@ -48,6 +48,17 @@ class UserFactory(Base):
last_name = factory.Faker("last_name")
atat_role = factory.SubFactory(RoleFactory)
dod_id = factory.LazyFunction(lambda: "".join(random.choices(string.digits, k=10)))
phone_number = factory.LazyFunction(
lambda: "".join(random.choices(string.digits, k=10))
)
service_branch = factory.LazyFunction(
lambda: random.choices([k for k, v in SERVICE_BRANCHES if k is not None])[0]
)
citizenship = "United States"
designation = "military"
date_latest_training = factory.LazyFunction(
lambda: datetime.date.today() + datetime.timedelta(days=-(random.randrange(1,365)))
)
@classmethod
def from_atat_role(cls, atat_role_name, **kwargs):