modify tests for python 3.x acceptance
parent
536e56836c
commit
9f19245c8a
|
@ -215,7 +215,8 @@ def test_filter_value_type_check():
|
|||
with pytest.raises(TypeError) as excinfo:
|
||||
Filter('created', '=', object())
|
||||
# On Python 2, the type of object() is `<type 'object'>` On Python 3, it's `<class 'object'>`.
|
||||
assert "Filter value of '<type 'object'>' is not supported" in str(excinfo.value)
|
||||
assert any([s in str(excinfo.value) for s in ["<type 'object'>", "'<class 'object'>'"]])
|
||||
assert "is not supported. The type must be a Python immutable type or dictionary" in str(excinfo.value)
|
||||
|
||||
with pytest.raises(TypeError) as excinfo:
|
||||
Filter("type", "=", complex(2, -1))
|
||||
|
|
Loading…
Reference in New Issue