from otree.api import expect from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): cases = ['skip_email', 'with_email'] def play_round(self): yield pages.Introduction if self.case == 'skip_email': yield pages.Email else: email = 'foo@example.com' yield pages.Email, {'email': email} expect(self.player.email, email)