Beispiel #1
0
def mock_teams_opTeam_empty():
    t1 = Roster(1)
    t1.winner = False
    t1.total_score = 0.0
    t1.total_projected = 0.0
    t1.yet_to_play = 1
    d = load_data('./tests/data', MyMock.mock_args_one_player())
    d1 = d['teams'][0]['roster']['entries'][0]
    p1 = Player(d1, 2021, 1)
    p1.rosterLocked = True
    t1.roster.append(p1)
    t2 = Roster(2)
    t2.winner = False
    t2.total_score = 0.0
    t2.total_projected = 0.0
    t2.yet_to_play = 0
    return [t1, t2]
Beispiel #2
0
def test_LOW_performance(mock_generate_info, mock_generate_stats):
    p = Player({}, 0, 0)
    p.rosterLocked = True
    p.score = 10
    p.proj = 100
    p.performance_check()
    assert p.performance == 'LOW'
Beispiel #3
0
def mock_teams_one_player_each():
    t1 = Roster(1)
    t1.winner = False
    t1.total_score = 0.0
    t1.total_projected = 0.0
    t1.yet_to_play = 0
    d = load_data('./tests/data', MyMock.mock_args_three_players())
    d1 = d['teams'][0]['roster']['entries'][0]
    p1 = Player(d1, 2021, 1)
    t1.roster.append(p1)
    t2 = Roster(2)
    t2.winner = False
    t2.total_score = 0.0
    t2.total_projected = 0.0
    t2.yet_to_play = 0
    d2 = d['teams'][0]['roster']['entries'][1]
    p2 = Player(d2, 2021, 1)
    t2.roster.append(p2)
    return [t1, t2]
Beispiel #4
0
def test_truncate(mock_generate_info, mock_generate_stats):
    p = Player({}, 0, 0)
    p.last = 'Reallylonglastname'
    p.truncate()
    assert p.last == 'Reallyl...'