Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_by_summoner(self):
mock_base_api = MagicMock()
expected_return = object()
mock_base_api.raw_request.return_value = expected_return
third_party_code = ThirdPartyCodeApiV3(mock_base_api)
region = "afaaas"
summoner_id = 82357
ret = third_party_code.by_summoner(region, summoner_id)
mock_base_api.raw_request.assert_called_once_with(
ThirdPartyCodeApiV3.__name__,
third_party_code.by_summoner.__name__,
region,
"https://afaaas.api.riotgames.com/lol/platform/v3/third-party-code/by-summoner/82357",
{},
)
assert ret is expected_return
def test_by_summoner(self):
mock_base_api = MagicMock()
expected_return = object()
mock_base_api.raw_request.return_value = expected_return
third_party_code = ThirdPartyCodeApiV3(mock_base_api)
region = "afaaas"
summoner_id = 82357
ret = third_party_code.by_summoner(region, summoner_id)
mock_base_api.raw_request.assert_called_once_with(
ThirdPartyCodeApiV3.__name__,
third_party_code.by_summoner.__name__,
region,
"https://afaaas.api.riotgames.com/lol/platform/v3/third-party-code/by-summoner/82357",
{},
)
assert ret is expected_return