papyrus
papyrus copied to clipboard
Fail test_create_attr_filter_and (python3)
I can't determine why this test fail
======================================================================
FAIL: test_create_attr_filter_and (papyrus.tests.test_protocol.create_attr_filter_Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "papyrus/papyrus/tests/test_protocol.py", line 283, in test_create_attr_filter_and
self.assertTrue((sql.and_(MappedClass.text.ilike("foo"), MappedClass.id == "1")).compare(filter))
AssertionError: False is not true
def test_create_attr_filter_and(self):
from sqlalchemy import sql
from papyrus.protocol import create_attr_filter
request = testing.DummyRequest(
params={"queryable": "text,id", "text__ilike": "foo", "id__eq": "1"}
)
MappedClass = self._get_mapped_class()
filter = create_attr_filter(request, MappedClass)
self.assertTrue((sql.and_(MappedClass.text.ilike("foo"), MappedClass.id == "1")).compare(filter))
@Jenselme an idea ? something we missed during the py3 check ?