Ejemplo n.º 1
0
def test_league_exception():
    with pytest.raises(Exception):
        league(
            year=2020,
            league_id=1234,
            cookies={}
        )
Ejemplo n.º 2
0
def test_league_runner_pass(mock_flow_response):
    mock_json = _resolve_relative_import('testData/flow_response_mock.json')

    mock_flow_response.return_value = MockFlowResponse(data=mock_json)

    result = league(
        year=2020,
        league_id=1234,
        cookies={}
    )

    assert isinstance(result, dict)
Ejemplo n.º 3
0
def fetch_league(meta):
    return league(
        league_id=meta['league_id'],
        year=meta['year'],
        cookies=meta['creds']
    )
Ejemplo n.º 4
0
def tester():
    league_data = league(year=2020, league_id=69561285, cookies=cookies)

    player_data = players(year=2020, league_id=69561285, cookies=cookies)
Ejemplo n.º 5
0
def fetch_league(self, meta):
    league(league_id=meta["league_id"], year=meta["year"], cookies=meta["creds"])

    self.update_state(state="PROGRESS")

    return self