@@ -34,7 +34,7 @@ def mock_dict(mock_doc):
3434 'fields' : {k : v for k , v in mock_doc .items () if k != 'mock_id' }
3535 }
3636
37- def test_solr_search_engine_fetch_for_query_generation (monkeypatch , solr_config , mock_doc , mock_dict ):
37+ def test_solr_search_engine_fetch_for_query_generation__expect__result_returned (monkeypatch , solr_config , mock_doc , mock_dict ):
3838 monkeypatch .setattr (requests , "get" , lambda * args , ** kwargs : MockResponseUniqueKey (ident = "mock_id" ))
3939 search_engine = SolrSearchEngine ("https://fakeurl" )
4040
@@ -49,7 +49,7 @@ def test_solr_search_engine_fetch_for_query_generation(monkeypatch, solr_config,
4949 doc_fields = solr_config .doc_fields )
5050 assert result [0 ] == Document (** mock_dict )
5151
52- def test_solr_search_engine_fetch_for_evaluation (monkeypatch , solr_config , mock_doc , mock_dict ):
52+ def test_solr_search_engine_fetch_for_evaluation__expect__result_returned (monkeypatch , solr_config , mock_doc , mock_dict ):
5353 monkeypatch .setattr (requests , "get" , lambda * args , ** kwargs : MockResponseUniqueKey (ident = "mock_id" ))
5454 search_engine = SolrSearchEngine ("https://fakeurl" )
5555
@@ -64,7 +64,7 @@ def test_solr_search_engine_fetch_for_evaluation(monkeypatch, solr_config, mock_
6464 doc_fields = solr_config .doc_fields )
6565 assert result [0 ] == Document (** mock_dict )
6666
67- def test_solr_search_engine_negative_post_fetch_for_query_generation_EXPECTED_HttpError (monkeypatch , solr_config ):
67+ def test_solr_search_engine_negative_post_fetch_for_query_generation__expect__HttpError (monkeypatch , solr_config ):
6868 for status_code in [400 , 401 , 402 , 403 , 500 ]:
6969 monkeypatch .setattr (requests , "get" , lambda * args , ** kwargs : MockResponseUniqueKey (ident = "identifier" ))
7070 monkeypatch .setattr (requests , "post" , lambda * args , ** kwargs : MockResponseSolrEngine ([], status_code = status_code ))
@@ -79,7 +79,7 @@ def test_solr_search_engine_negative_post_fetch_for_query_generation_EXPECTED_Ht
7979 )
8080
8181
82- def test_solr_search_engine_negative_post_fetch_for_evaluation_EXPECTED_HttpError (monkeypatch , solr_config ):
82+ def test_solr_search_engine_negative_post_fetch_for_evaluation__expect__HttpError (monkeypatch , solr_config ):
8383 for status_code in [400 , 401 , 402 , 403 , 500 ]:
8484 monkeypatch .setattr (requests , "get" , lambda * args , ** kwargs : MockResponseUniqueKey (ident = "identifier" ))
8585 monkeypatch .setattr (requests , "post" , lambda * args , ** kwargs : MockResponseSolrEngine ([], status_code = status_code ))
@@ -137,6 +137,6 @@ def test_template_to_json_payload(monkeypatch):
137137 }
138138 assert solr_engine ._template_to_json_payload (template ) == expected_payload
139139
140- def test_solr_search_engine_bad_url_EXPECTED_ValidationError ():
140+ def test_solr_search_engine_bad_url__expect__ValidationError ():
141141 with pytest .raises (ValidationError ):
142142 _ = SolrSearchEngine ("fake-NONurl" )
0 commit comments