1717# limitations under the License.
1818"""Search tests."""
1919
20+ from urllib .parse import unquote
21+
2022import pytest
2123from eodag import EOProduct , SearchResult
2224from eodag .api .product .metadata_mapping import ONLINE_STATUS
@@ -844,10 +846,11 @@ async def test_pagination_with_federation_backend(request_valid, defaults, metho
844846 assert next_link ["method" ] == method
845847
846848 if method == "GET" :
847- assert f"token={ backend_token } " in next_link ["href" ]
848- assert "query=" in next_link ["href" ]
849- assert "federation:backends" in next_link ["href" ]
850- assert "test_provider" in next_link ["href" ]
849+ next_link_url = unquote (next_link ["href" ])
850+ assert f"token={ backend_token } " in next_link_url
851+ assert "query=" in next_link_url
852+ assert "federation:backends" in next_link_url
853+ assert "test_provider" in next_link_url
851854 else : # POST
852855 assert "body" in next_link
853856 assert next_link ["body" ]["token" ] == backend_token
@@ -869,7 +872,7 @@ async def test_pagination_limit_handling(request_valid, defaults, method, limit,
869872 """Test that pagination respects limit parameter for both GET and POST."""
870873 # Create a mock search result
871874 search_result = SearchResult (
872- [EOProduct ("test_provider " , {"id" : "_" , "collection" : "_" })] * 10 , next_page_token = "limit_token_123"
875+ [EOProduct ("creodias " , {"id" : "_" , "collection" : "_" })] * 10 , next_page_token = "limit_token_123"
873876 )
874877
875878 if method == "GET" :
0 commit comments