From 4b6909535e6cdab8d12e98ee6ff1951d0ab15990 Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Tue, 2 Apr 2024 15:27:55 -0400 Subject: [PATCH] flaky --- stix2/test/v21/test_properties.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stix2/test/v21/test_properties.py b/stix2/test/v21/test_properties.py index fcb73a3c..0eff3c29 100644 --- a/stix2/test/v21/test_properties.py +++ b/stix2/test/v21/test_properties.py @@ -22,6 +22,7 @@ def test_dictionary_property(): with pytest.raises(ValueError): p.clean({}, False) + def test_dictionary_property_values_str(): p = DictionaryProperty(valid_types=[StringProperty], spec_version='2.1') result = p.clean({'x': '123'}, False) @@ -31,6 +32,7 @@ def test_dictionary_property_values_str(): with pytest.raises(ValueError): assert q.clean({'x': [123]}, False) + def test_dictionary_property_values_int(): p = DictionaryProperty(valid_types=[IntegerProperty], spec_version='2.1') result = p.clean({'x': 123}, False) @@ -40,6 +42,7 @@ def test_dictionary_property_values_int(): with pytest.raises(ValueError): assert q.clean({'x': [123]}, False) + def test_dictionary_property_values_stringlist(): p = DictionaryProperty(valid_types=[ListProperty(StringProperty)], spec_version='2.1') result = p.clean({'x': ['abc', 'def']}, False) @@ -53,6 +56,7 @@ def test_dictionary_property_values_stringlist(): with pytest.raises(ValueError): assert r.clean({'x': [123, 456]}) + def test_dictionary_property_values_list(): p = DictionaryProperty(valid_types=[StringProperty, IntegerProperty], spec_version='2.1') result = p.clean({'x': 123}, False) @@ -66,6 +70,7 @@ def test_dictionary_property_values_list(): with pytest.raises(ValueError): assert r.clean({'x': ['abc', 'def']}, False) + ID_PROP = IDProperty('my-type', spec_version="2.1") MY_ID = 'my-type--232c9d3f-49fc-4440-bb01-607f638778e7'