'Test that text searches return a 503 when Elasticsearch is down.
The endpoint should still return 200 when a search is not supplied.'

@patch.object(SearchEngine, 'get_search_engine', side_effect=ES_ERROR)
def test_list_teams(self, __):

    self.get_teams_list(expected_status=503, data={'course_id': self.test_course_1.id, 'text_search': 'zoinks'}, user='staff')
    self.get_teams_list(expected_status=200, data={'course_id': self.test_course_1.id}, user='staff')
