Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions stix2/test/v21/test_datastore_relational_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,15 +687,13 @@ class TestClass:

try:
yield TestClass
except: # noqa: E722
finally:
ext_id = kwargs.get("extension_name")
if not ext_id and len(args) >= 3:
ext_id = args[2]

_unregister("objects", TestClass._type, ext_id)

raise


@contextlib.contextmanager
def _register_observable(*args, **kwargs):
Expand All @@ -713,15 +711,13 @@ class TestClass:

try:
yield TestClass
except: # noqa: E722
finally:
ext_id = kwargs.get("extension_name")
if not ext_id and len(args) >= 4:
ext_id = args[3]

_unregister("observables", TestClass._type, ext_id)

raise


# "Base" properties used to derive property variations for testing (e.g. in a
# list, in a dictionary, in an embedded object, etc). Also includes sample
Expand Down
Loading