def step_impl(context, date, opponent_id, opponent, is_home, game_type): valid_schedule = post_valid_schedule() valid_schedule.date = date valid_schedule.opponentId = opponent_id valid_schedule.opponent = opponent valid_schedule.isHome = is_home valid_schedule.gameType = game_type context.valid_schedule = valid_schedule context.json_request = json.dumps(valid_schedule, default=lambda x: x.__dict__)
def step_impl(context, date, opponent_id, opponent, is_home, game_type): schedule = post_valid_schedule() if opponent == 'null': schedule.opponent = None else: schedule.opponent = opponent schedule.date = date schedule.opponentId = opponent_id schedule.opponent = opponent schedule.isHome = is_home schedule.gameType = game_type context.valid_schedule = schedule context.json_request = dump_schedule_json(schedule)
def a_schedule_post_with_inputted_fields_entered(context): schedule = post_valid_schedule() schedule.opponent = "" context.valid_schedule = schedule context.json_request = dump_schedule_json(schedule)
def a_schedule_delete_with_inputted_fields_entered(context): schedule = post_valid_schedule() schedule.opponentId = "~1234" context.valid_schedule = schedule context.json_reuest = dump_schedule_json(schedule)
def a_schedule_update_with_inputted_fields_entered(context): schedule = post_valid_schedule() schedule.gameId = None context.valid_schedule = schedule context.json_request = dump_schedule_json(schedule)
def a_valid_schedule_post_with_all_inputted_fields_entered(context): valid_schedule = post_valid_schedule() context.valid_schedule = valid_schedule context.json_request = json.dumps(valid_schedule, default=lambda x: x.__dict__)