def test_search_is_quick_must_ignore_quotes(self): query = "\"eu_gene\"" search_results = {'hits': {'hits': [{'_source': {'keys': ['key_1', 'eu_gene']}}]}} self.assertTrue(search_is_quick(query, search_results))
def test_search_is_quick_in_keys(self): query = "eu_gene" search_results = {'hits': {'hits': [{'_source': {'keys': ['key_1', 'eu_gene']}}]}} self.assertTrue(search_is_quick(query, search_results))
def test_search_is_quick_in_keys_case_insensitive(self): query = " Eu_GeNe " search_results = {'hits': {'hits': [{'_source': {'keys': ['key_1', 'eu_gene']}}]}} self.assertTrue(search_is_quick(query, search_results))
def test_search_is_not_quick_when_empty_query(self): query = "" search_results = {'hits': {'hits': [{'_source': {'keys': ['key_1', 'key_2']}}]}} self.assertFalse(search_is_quick(query, search_results))