1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Create tests for the WEI app

This commit is contained in:
Yohann D'ANELLO
2020-08-10 23:18:40 +02:00
parent 3784e97d60
commit 0fae5b3e62
4 changed files with 404 additions and 5 deletions

View File

@ -37,7 +37,7 @@ class WEISurveyForm2020(forms.Form):
words = [choice(WORDS) for _ in range(10)]
words = [(w, w) for w in words]
if self.data:
self.fields["word"].choices = WORDS
self.fields["word"].choices = [(w, w) for w in WORDS]
if self.is_valid():
return
self.fields["word"].choices = words