Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ObjectReferenceProperty to ReferenceProperty in 2.1 SCO classes #409

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

chisholm
Copy link
Contributor

@chisholm chisholm commented Jun 8, 2020

Fixes #403

Also add a unit test to ensure that when a stix2 object is passed as a value of a ReferenceProperty of a 2.1 SCO, that the ID is properly pulled out and used as the actual property value, and that it doesn't affect the deterministic ID calculation.

chisholm added 2 commits June 8, 2020 17:24
to ReferenceProperty.  Add a unit test to ensure that when a
stix2 object is passed as a value of a ReferenceProperty, that
the ID is properly pulled out and used as the actual property
value, and that it doesn't affect the deterministic ID
calculation.
@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2020

Codecov Report

Merging #409 into master will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #409      +/-   ##
==========================================
+ Coverage   98.31%   98.43%   +0.12%     
==========================================
  Files         128      128              
  Lines       14394    14737     +343     
==========================================
+ Hits        14152    14507     +355     
+ Misses        242      230      -12     
Impacted Files Coverage Δ
stix2/base.py 97.83% <ø> (+1.08%) ⬆️
stix2/v21/observables.py 96.93% <ø> (ø)
stix2/test/v21/test_deterministic_ids.py 100.00% <100.00%> (+0.78%) ⬆️
stix2/test/v21/test_observed_data.py 100.00% <100.00%> (ø)
stix2/test/v20/conftest.py 100.00% <0.00%> (ø)
stix2/test/v21/conftest.py 100.00% <0.00%> (ø)
stix2/datastore/__init__.py 100.00% <0.00%> (ø)
stix2/test/v20/test_tool.py 100.00% <0.00%> (ø)
stix2/test/v21/test_note.py 100.00% <0.00%> (ø)
stix2/test/v21/test_tool.py 100.00% <0.00%> (ø)
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bde22f...00b78e7. Read the comment docs.

Copy link
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @chisholm!

@clenk clenk merged commit fdb8875 into oasis-open:master Jun 10, 2020
@emmanvg emmanvg added this to the 2.0.0 milestone Jun 10, 2020
@chisholm chisholm deleted the fix_sco_ref_props branch February 16, 2021 20:21
@chisholm chisholm restored the fix_sco_ref_props branch February 16, 2021 20:21
@chisholm chisholm deleted the fix_sco_ref_props branch February 16, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several 2.1 SCO classes are still using 2.0-era ObjectReferenceProperty
4 participants