Skip to content

Commit

Permalink
flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiazza committed Apr 2, 2024
1 parent 8020efd commit 4b69095
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stix2/test/v21/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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'

Expand Down

0 comments on commit 4b69095

Please sign in to comment.