From 9f19245c8aa3f94e86005902d90ef6e8de26fdc5 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 22 Mar 2018 11:23:48 -0400 Subject: [PATCH] modify tests for python 3.x acceptance --- stix2/test/test_datastore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stix2/test/test_datastore.py b/stix2/test/test_datastore.py index af9176f..70deb38 100644 --- a/stix2/test/test_datastore.py +++ b/stix2/test/test_datastore.py @@ -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 `` On Python 3, it's ``. - assert "Filter value of '' is not supported" in str(excinfo.value) + assert any([s in str(excinfo.value) for s in ["", "''"]]) + 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))