Пример #1
0
def create_random_player(player_id_length=5):
    player = Player(player_id=generate_random_int(length=player_id_length),
                    name=generate_random_string(),
                    email="{}@test.com".format(generate_random_string()),
                    surname=generate_random_string(),
                    country_code=generate_random_country_code(),
                    city=generate_random_string(),
                    zip_code=generate_random_int(),
                    state=generate_random_state(),
                    mobile_phone=generate_random_int(14),
                    signup_date=generate_random_date(include_time=True),
                    date_of_bith=generate_random_date(),
                    custom_int_1=generate_random_int(1),
                    custom_int_2=generate_random_int(2),
                    custom_int_3=generate_random_int(1),
                    custom_int_4=generate_random_int(2),
                    custom_string=generate_random_string(),
                    custom_string_2=generate_random_string(),
                    custom_string_3=generate_random_string(),
                    custom_string_4=0,
                    time_zone=generate_random_int(2),
                    language_code=generate_random_language_code(),
                    btag=generate_random_string(),
                    promo_code=generate_random_string(),
                    tracking_code=generate_random_string(),
                    optout_email=generate_random_boolean(),
                    optout_sms=generate_random_boolean(),
                    optout_push=generate_random_boolean(),
                    optout_mobile_push=generate_random_boolean())
    return player
Пример #2
0
def create_parimutuel_event(is_future=None):
    parimutuel_event = Event(event=generate_random_string(length=40),
                             breed=generate_random_string(length=40),
                             event_date=generate_random_date(
                                 include_time=True, is_future=is_future),
                             event_id=generate_random_string(length=40))
    return parimutuel_event
Пример #3
0
def create_sport_event(is_future=None):
    sport_event = SportEvent(sport=generate_random_string(length=250),
                             league=generate_random_string(length=250),
                             event=generate_random_string(length=250),
                             live=generate_random_boolean(),
                             event_date=generate_random_date(
                                 include_time=True, is_future=is_future),
                             event_id=generate_random_string(length=40))
    return sport_event
Пример #4
0
def create_game_session_request(player_id, init_id=None, total_sessions=1):
    if not player_id:
        player_id = generate_random_string(40),

    if not init_id:
        init_id = generate_random_string(40),

    session_request = GameSessionRequest(player_id, init_id)

    for i in range(total_sessions):
        session = GameSession(
            session_date=generate_random_date(is_future=True),
            game_type=generate_random_string(250),
            game_identifier=generate_random_string(100))
        session_request.add_game_session(session)
    return session_request
Пример #5
0
def create_random_game():
    length = 20
    game = CasinoGame(game_type=generate_random_string(length), game_identifier=generate_random_string(length))
    return game
Пример #6
0
 def test_tc_15_wager_bet_non_existing_category(self):
     wager = create_bet()
     wager.EventCategory = generate_random_string()
     player, revenue, request_id = self._create_player_with_wager([wager])
     result = self.get_wager_from_db(player)
     self.assertFalse(result == [])
Пример #7
0
def create_lottery_event(is_future=None):
    lottery_event = LotteryEvent(name=generate_random_string(length=250),
                                 category=generate_random_string(length=250),
                                 draw_date=generate_random_date(
                                     include_time=True, is_future=is_future))
    return lottery_event
Пример #8
0
def create_freespin(is_future=False):
    freespin = Freespin(value=generate_random_int(),
                        transaction_date=generate_random_date(
                            include_time=True, is_future=is_future),
                        identifier=generate_random_string(100))
    return freespin
Пример #9
0
def create_game_session():
    session = GameSession(session_date=generate_random_date(),
                          game_type=generate_random_string(200),
                          game_identifier=generate_random_string(100))
    return session