@@ -68,15 +68,16 @@ def test_client_list_repositories_dict(client: Client, mock_repository_list_rout
6868def test_client_list_repositories_csv (client : Client , mock_repository_list_route : Route ) -> None :
6969 response = client .repositories .list (return_type = ReturnType .CSV )
7070 assert isinstance (response , str )
71- assert '"id": "r3d100010371",' in response
72- assert '"doi": "https://doi.org/10.17616/R3P594",' in response
71+ assert response .startswith ("id,doi,name," )
72+ assert "r3d100010371" in response
73+ assert "https://doi.org/10.17616/R3P594" in response
7374
7475
7576def test_client_list_repositories_dataframe (client : Client , mock_repository_list_route : Route ) -> None :
7677 response = client .repositories .list (return_type = ReturnType .DATAFRAME )
77- assert isinstance (response , str )
78- assert '"id": "r3d100010371",' in response
79- assert '"doi": "https://doi.org/10.17616/R3P594",' in response
78+ assert isinstance (response , DataFrame )
79+ assert response . shape == ( 3 , 5 )
80+ assert response [ "id" ]. loc [ 0 ] == "r3d100010371"
8081
8182
8283def test_client_list_repositories_response (client : Client , mock_repository_list_route : Route ) -> None :
@@ -149,17 +150,17 @@ def test_client_get_single_repository_dict(client: Client, mock_repository_get_r
149150def test_client_get_single_repository_csv (client : Client , mock_repository_get_route : Route , zenodo_id : str ) -> None :
150151 response = client .repositories .get (zenodo_id , return_type = ReturnType .CSV )
151152 assert isinstance (response , str )
152- assert "id,doi,name,link.href" in response
153- assert '"re3data.orgIdentifier": " r3d100010468",' in response
153+ assert response . startswith ( "re3data.orgIdentifier,additionalName,repositoryURL," )
154+ assert " r3d100010468" in response
154155
155156
156157def test_client_get_single_repository_dataframe (
157158 client : Client , mock_repository_get_route : Route , zenodo_id : str
158159) -> None :
159160 response = client .repositories .get (zenodo_id , return_type = ReturnType .DATAFRAME )
160161 assert isinstance (response , DataFrame )
161- assert "{" in response
162- assert ' "re3data.orgIdentifier": "r3d100010468",' in response
162+ assert response . shape == ( 1 , 43 )
163+ assert response [ "re3data.orgIdentifier" ]. loc [ 0 ] == "r3d100010468"
163164
164165
165166def test_client_get_single_repository_response (
0 commit comments