@pytest.mark.parametrize('search_param, query_params, expected', [(None, {'search': 'test'}, 'test'), ('search', {'search': 'test'}, 'test'), ('q', {'q': 'test'}, 'test'), ('search', {'q': 'test'}, '')])
def test_get_search_query(self, search_param, query_params, expected):
    request = rf.get('/test/')
    request.query_params = query_params
    if search_param:
        self.backend.search_param = search_param
    result = self.backend.get_search_query(request)
    assert (result == expected)
@pytest.mark.parametrize('search_param, query_params, expected', [(None, {'search': 'test'}, 'test'), ('search', {'search': 'test'}, 'test'), ('q', {'q': 'test'}, 'test'), ('search', {'q': 'test'}, )])
def test_get_search_query(self, search_param, query_params, expected):
    request = rf.get('/test/')
    request.query_params = query_params
    if search_param:
        self.backend.search_param = search_param
    result = self.backend.get_search_query(request)
    assert (result == expected)