def test_get_valid_fields_with_es_ordering_fields(self):
    es_ordering_fields = ('first_name', 'last_name', ('is_active', 'active'))
    view = self.create_view(es_ordering_fields)
    expected = [('first_name', 'first_name'), ('last_name', 'last_name'), ('is_active', 'active')]
    result = self.backend.get_valid_fields([], view)
    assert (result == expected)
def test_get_valid_fields_with_es_ordering_fields(self):
    es_ordering_fields = ('first_name', 'last_name', ('is_active', 'active'))
    view = self.create_view(es_ordering_fields)
    expected = [('first_name', 'first_name'), ('last_name', 'last_name'), ('is_active', 'active')]
    result = self.backend.get_valid_fields([], view)
    assert (result == expected)