mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-09-01 01:15:23 +02:00
tests
This commit is contained in:
@@ -53,9 +53,11 @@ class TestWEIAlgorithm(TestCase):
|
||||
birth_date='2000-01-01',
|
||||
)
|
||||
information = WEISurveyInformation2025(registration)
|
||||
for j in range(1, 21):
|
||||
for j in range(1, 1 + NB_WORDS):
|
||||
setattr(information, f'word{j}', random.choice(WORDS['list']))
|
||||
information.step = 20
|
||||
for q in WORDS['questions']:
|
||||
setattr(information, q, random.choice(list(WORDS['questions'][q][1].keys())))
|
||||
information.step = len(WORDS['questions']) + 2
|
||||
information.save(registration)
|
||||
registration.save()
|
||||
|
||||
@@ -87,7 +89,7 @@ class TestWEIAlgorithm(TestCase):
|
||||
setattr(information, f'word{j}', random.choice(WORDS['list']))
|
||||
for q in WORDS['questions']:
|
||||
setattr(information, q, random.choice(list(WORDS['questions'][q][1].keys())))
|
||||
information.step = len(WORDS['questions']) + 1
|
||||
information.step = len(WORDS['questions']) + 2
|
||||
information.save(registration)
|
||||
registration.save()
|
||||
survey = WEISurvey2025(registration)
|
||||
|
Reference in New Issue
Block a user