def test_league_exception(): with pytest.raises(Exception): league( year=2020, league_id=1234, cookies={} )
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)
def fetch_league(meta): return league( league_id=meta['league_id'], year=meta['year'], cookies=meta['creds'] )
def tester(): league_data = league(year=2020, league_id=69561285, cookies=cookies) player_data = players(year=2020, league_id=69561285, cookies=cookies)
def fetch_league(self, meta): league(league_id=meta["league_id"], year=meta["year"], cookies=meta["creds"]) self.update_state(state="PROGRESS") return self