Exemplo n.º 1
0
def test_gameday_post(_game_info, _timestamp):
    _timestamp.return_value = 'foo'
    _game_info.return_value = game

    _, post = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(exp_post.strip(), post)
Exemplo n.º 2
0
def test_gameday_post(_game_info, _timestamp):
    _timestamp.return_value = 'foo'
    _game_info.return_value = game

    _, post = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(exp_post.strip(), post)
Exemplo n.º 3
0
def test_gameday_title(_game_info):
    _game_info.return_value = game

    title, _ = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(title, ("Gameday Thread 4/9/13: Rockies (Francis) "
                          "at Giants (Zito) (7:15PM)"))
Exemplo n.º 4
0
def test_gameday_title(_game_info):
    _game_info.return_value = game

    title, _ = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(title, ("Gameday Thread 4/9/13: Rockies (Francis) "
                          "at Giants (Zito) (7:15PM)"))
Exemplo n.º 5
0
def test_gameday_post(_game_info, _timestamp):
    _timestamp.return_value = 'foo'
    _game_info.return_value = game

    _, post = bot.gamethread_post('default', 'foo', PACIFIC)

    assert_equals(exp_post.strip(), post)
Exemplo n.º 6
0
def test_gameday_title_with_template(_game_info):
    _game_info.return_value = game

    title, _ = bot.gamethread_post('athletics', 'foo', PACIFIC)

    assert_equals(title, ("GAMEDAY THREAD 4/9/13: Rockies (5-1) @ "
                          "Giants (4-2)"))
Exemplo n.º 7
0
def test_gameday_title(_game_info):
    _game_info.return_value = game

    title, _ = bot.gamethread_post('default', 'foo', PACIFIC)

    assert_equals(title, ("Gameday Thread 4/9/13: Rockies (Francis) "
                          "at Giants (Zito) (7:15PM)"))
Exemplo n.º 8
0
def test_gameday_post_no_pitchers(_game_info, _timestamp):
    teams = [
        Team('Rockies', '5-1', [Player('Foo', 'P')], None),
        Team('Giants', '4-2', [Player('Bar', 'P')], None),
    ]

    g = Boxscore(teams, datetime(2013, 4, 10, 2, 15, tzinfo=timezone.utc),
                 '64 Clear')

    _timestamp.return_value = 'foo'
    _game_info.return_value = g

    _, post = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(exp_post_no_pitchers.strip(), post)
Exemplo n.º 9
0
def test_gameday_post_no_pitchers(_game_info, _timestamp):
    teams = [
        Team('Rockies', '5-1', [Player('Foo', 'P')], None),
        Team('Giants', '4-2', [Player('Bar', 'P')], None),
    ]

    g = Boxscore(teams,
                 datetime(2013, 4, 10, 2, 15, tzinfo=timezone.utc),
                 '64 Clear')

    _timestamp.return_value = 'foo'
    _game_info.return_value = g

    _, post = bot.gamethread_post('foo', pytz.timezone('US/Pacific'))

    assert_equals(exp_post_no_pitchers.strip(), post)