Test_Johanne/v2_exp_e4c_a_p0/tests.py

24 lines
736 B
Python
Raw Permalink Normal View History

2025-03-06 10:28:01 +01:00
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.Bienvenue0, {
'versionexp': random.randint(1,2),
})
if self.participant.vars['versionexp'] == 1:
yield (pages.Bienvenue)
elif self.participant.vars['versionexp'] == 2:
yield (pages.BienvenueBis)