Exemple #1
0
def test_all_stats(_schedule, _standings, _timestamp):
    _timestamp.return_value = "2013-04-06 12:31 AM"
    _schedule.return_value = (
        [Game('LA Dodgers', datetime(2013, 1, 1), True, True, "1-1")],
        [Game('LA Dodgers', datetime(2013, 1, 2), True, None, "0-0")],
    )
    _standings.return_value = [
        Standing('San Francisco', 3, 1, .75, 0.0),
        Standing('San Francisco', 3, 1, .75, 0.0),
    ]

    print(bot.all_stats('NATIONAL', 'WEST', 'foo'))
    assert_equals(sidebar.strip(), bot.all_stats('NATIONAL', 'WEST', 'foo'))
Exemple #2
0
def test_all_stats(_schedule, _standings, _timestamp):
    _timestamp.return_value = "2013-04-06 12:31 AM"
    _schedule.return_value = (
        [Game('LA Dodgers', datetime(2013, 1, 1), True, True, "1-1")],
        [Game('LA Dodgers', datetime(2013, 1, 2), True, None, "0-0")],
    )
    _standings.return_value = [
        Standing('San Francisco', 3, 1, .75, 0.0),
        Standing('San Francisco', 3, 1, .75, 0.0),
    ]

    print(bot.all_stats('NATIONAL', 'WEST', 'foo'))
    assert_equals(sidebar.strip(), bot.all_stats('NATIONAL', 'WEST', 'foo'))
Exemple #3
0
def test_nationals_stats(_schedule, _standings, _timestamp):
    _timestamp.return_value = "2013-04-06 12:31 AM"
    _schedule.return_value = [mock.Mock(), mock.Mock()]
    _standings.return_value = [
        Standing('San Francisco', 'WSH', 3, 1, .75, 0.0, 'Won 2'),
        Standing('San Francisco', 'NYM', 3, 1, .75, 0.0, 'Won 2'),
    ]

    assert_equals(nationals_sidebar,
                  bot.all_stats('nationals', 'NATIONAL', 'EAST', 'foo'))