@pytest.mark.parametrize('fields, expected', [(['first_name', 'last_name', '-active'], ['first_name', '-is_active']), (['+first_name', 'last_name', '#active'], ['+first_name']), (['+first_name', '-active'], ['+first_name', '-is_active'])])
def test_remove_invalid_fields(self, fields, expected):
    es_ordering_fields = ('first_name', ('is_active', 'active'))
    view = self.create_view(es_ordering_fields)
    request = rf.get('/test/')
    result = self.backend.remove_invalid_fields([], fields, view, request)
    assert (result == expected)
@pytest.mark.parametrize('fields, expected', [(['first_name', 'last_name', '-active'], ['first_name', '-is_active']), (['+first_name', 'last_name', '#active'], ['+first_name']), (['+first_name', '-active'], ['+first_name', '-is_active'])])
def test_remove_invalid_fields(self, fields, expected):
    es_ordering_fields = ('first_name', ('is_active', 'active'))
    view = self.create_view(es_ordering_fields)
    request = rf.get('/test/')
    result = self.backend.remove_invalid_fields([], fields, view, request)
    assert (result == expected)