def test_get_floor(self) -> None: """Test get_floor().""" client = DMMApiClient(API_ID, AFFILIATE_ID) res = client.get_floor() res.raise_for_status() res_body = res.json() assert isinstance(res_body['result']['site'], list)
def test_search_author(self) -> None: """Test search_actress().""" client = DMMApiClient(API_ID, AFFILIATE_ID) res = client.search_author(27, hits=1) res.raise_for_status() res_body = res.json() assert res_body['result']['status'] == '200' assert isinstance(res_body['result']['author'], list)
def test_get_item_list(self) -> None: """Test get_item_list().""" client = DMMApiClient(API_ID, AFFILIATE_ID) res = client.get_item_list('DMM.com', hits=1) res.raise_for_status() res_body = res.json() assert res_body['result']['status'] == 200 assert isinstance(res_body['result']['items'], list) res = client.get_item_list('FANZA', service='digital', floor='videoa', hits=1) res.raise_for_status() res_body = res.json() assert res_body['result']['status'] == 200 assert isinstance(res_body['result']['items'], list)
def test_init(self) -> None: """Test __init__().""" client = DMMApiClient(API_ID, AFFILIATE_ID) assert isinstance(client, DMMApiClient)