Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
    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)
Esempio n. 4
0
 def test_init(self) -> None:
     """Test __init__()."""
     client = DMMApiClient(API_ID, AFFILIATE_ID)
     assert isinstance(client, DMMApiClient)