Skip to content

Commit

Permalink
Merge pull request #603 from chisholm/relational-data-sink-update-dic…
Browse files Browse the repository at this point in the history
…t-unit-test

Minor fix to certain relational data sink unit tests related to dictionary properties
  • Loading branch information
rpiazza authored Sep 17, 2024
2 parents f294727 + c847a5c commit 3f17c0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stix2/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def clean(self, value, allow_custom=False, strict=False):
except CustomContentError:
# Need to propagate these, not treat as a type error
raise
except Exception as e:
except Exception:
# clean failed; value must not conform to type_
# Should be a narrower exception type here, but I don't
# know if it's safe to assume any particular exception
Expand Down
4 changes: 1 addition & 3 deletions stix2/test/v21/test_datastore_relational_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,7 @@ class Embedded(stix2.v21._STIXBase21):

elif request.param == "dict-of":
prop_variation = stix2.properties.DictionaryProperty(
# DictionaryProperty.valid_types does not accept property
# instances (except ListProperty instances), only classes...
valid_types=type(base_property)
valid_types=base_property
)
# key name doesn't matter here
prop_variation_value = {"key": prop_value}
Expand Down

0 comments on commit 3f17c0f

Please sign in to comment.