39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
|
from otree.api import Currency as c, currency_range, Submission
|
||
|
from . import pages
|
||
|
from ._builtin import Bot
|
||
|
from .models import Constants
|
||
|
import random
|
||
|
|
||
|
|
||
|
# **********************************************************************************************************************
|
||
|
# *** BOT
|
||
|
# **********************************************************************************************************************
|
||
|
class PlayerBot(Bot):
|
||
|
def play_round(self):
|
||
|
yield (pages.Bienvenue)
|
||
|
|
||
|
yield (pages.Questionnaire4, {
|
||
|
'q_40_etude': 1,
|
||
|
'q_41_gender': 1,
|
||
|
'q_42_age': random.randint(18, 40),
|
||
|
'q_43_nationalite': 5,
|
||
|
'q_44_revenu': 1,
|
||
|
'q3_countries': 1,
|
||
|
'q_46_logement_ville': 'fr',
|
||
|
'q_31': 3,
|
||
|
'q_47_residence': 1,
|
||
|
'q_48_satisfaction': 2,
|
||
|
'q_49_propositions': 'sasasadad'
|
||
|
})
|
||
|
|
||
|
yield (pages.Result, {
|
||
|
'lastname': 'a',
|
||
|
'firstname': 'b',
|
||
|
'email': '@',
|
||
|
'room': 'a',
|
||
|
})
|
||
|
|
||
|
yield (pages.FinalPage2)
|
||
|
|
||
|
|