Fix factories and seed sample script
Update display of defense component on portfolio settings page
This commit is contained in:
@@ -21,6 +21,10 @@ def random_service_branch():
|
||||
return random_choice(data.SERVICE_BRANCHES)
|
||||
|
||||
|
||||
def random_defense_component():
|
||||
return [random_choice(data.SERVICE_BRANCHES)]
|
||||
|
||||
|
||||
def random_dod_id():
|
||||
return "".join(random.choices(string.digits, k=10))
|
||||
|
||||
@@ -104,7 +108,7 @@ class PortfolioFactory(Base):
|
||||
model = Portfolio
|
||||
|
||||
name = factory.Faker("domain_word")
|
||||
defense_component = factory.LazyFunction(random_service_branch)
|
||||
defense_component = factory.LazyFunction(random_defense_component)
|
||||
description = factory.Faker("sentence")
|
||||
|
||||
@classmethod
|
||||
|
@@ -34,7 +34,7 @@ def test_create_portfolio_success(client, user_session):
|
||||
data={
|
||||
"name": "My project name",
|
||||
"description": "My project description",
|
||||
"defense_component": "army",
|
||||
"defense_component": ["army"],
|
||||
},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user