def setUp(self): super(ChooseRequestsTests, self).setUp() create_test_map() register_user('test_user', '*****@*****.**', '111111') account = AccountPrototype.get_by_email('*****@*****.**') self.storage = LogicStorage() self.storage.load_account_data(AccountPrototype.get_by_id(account.id)) self.hero =self.storage.accounts_to_heroes[account.id] self.choice_uid = '[ns-0]choice_1' self.option_uid = '#option<[ns-0]choice_1, [ns-0]choice_2>'
def setUp(self): super(ChooseRequestsTests, self).setUp() create_test_map() register_user('test_user', '*****@*****.**', '111111') account = AccountPrototype.get_by_email('*****@*****.**') self.storage = LogicStorage() self.storage.load_account_data(AccountPrototype.get_by_id(account.id)) self.hero = self.storage.accounts_to_heroes[account.id] self.choice_uid = '[ns-0]choice_1' self.option_uid = '#option<[ns-0]choice_1, [ns-0]choice_2>'
def get_account_id_by_email(email): account = AccountPrototype.get_by_email(normalize_email(email)) return account.id if account else None