Commit Graph

288 Commits (44248092256a0e58902d5089bb387ee1c5e809cb)

Author SHA1 Message Date
Chris Lenk e91b71f300 Test adding a data source to the workbench 2018-03-30 12:02:27 -04:00
Chris Lenk 5285934034 Make Workbench use implicit ObjectFactory
This is needed to implement functions like `set_default_creator`.

The changes to Tox are so that the wrapping we do in workbench doesn't
affect the rest of our tests. If we test them all in one go, pytest will
import all the tests before running any of them. This will cause the
workbench versions of the SDO classes to be used in all tests.
2018-03-30 12:02:27 -04:00
Chris Lenk b2613ca62c Add Workbench wrapper functions 2018-03-30 12:02:27 -04:00
Chris Lenk aeff8f4bc0 Create Workbench layer
Contains a default implicit Environment and functions to get all objects
a specific type.
2018-03-30 12:02:27 -04:00
Greg Back e92db2417a
Merge pull request #147 from oasis-open/119-taxii-filters
119 taxii filters
2018-03-28 15:24:28 -05:00
= 51dcd6c184 same as last commit 2018-03-22 11:46:49 -04:00
= b1579ae265 same as last commit 2018-03-22 11:36:35 -04:00
= 9f19245c8a modify tests for python 3.x acceptance 2018-03-22 11:23:48 -04:00
= 536e56836c adding Filter check when the Filter property is 'type', checks the value has no underscores (issue #136) 2018-03-22 10:59:07 -04:00
= 7880e4a89b passing TAXII query params in correct format to taxii2client; patching bug where TAXII query filters were being applied again locally to STIX objects via Filters (which doesnt work) 2018-03-21 17:19:05 -04:00
= 2fbde05e6c putting test files in stix type folder that exists on git (bc there are files in it) 2018-03-14 19:34:07 -04:00
= f4558c0958 pre-commit errors 2018-03-14 19:09:25 -04:00
= af14cd4f88 more type checking of filesystem json files; added corresponding tests 2018-03-14 16:28:44 -04:00
Chris Lenk 5a71ef2e64 Fix allow_custom in functions calling new_version 2018-03-02 11:32:07 -05:00
Chris Lenk 1eab9b2832 Assume custom properties allowable in add_markings 2018-03-02 10:21:51 -05:00
Chris Lenk 5f703509be Rename "sources" subpackage to "datastore"
Fix #114.
2018-03-01 09:04:42 -05:00
Chris Lenk 7bdf786f89 Remove deprecated tests 2018-02-27 12:17:26 -05:00
Chris Lenk 57eb709c48 Merge branch 'master' into taxii_collection_source_404 2018-02-26 17:08:28 -05:00
Chris Lenk 5427e79d71 Fix pycodestyle/isort issues 2018-02-19 15:03:20 -05:00
Chris Lenk 845934033e Avoid checking valid refs when deepcopying
Using `deepcopy` on an Observable object that referenced another (e.g.
domain name -> resolves to -> IPv4 address) would fail because no
`_valid_refs` were available. Assuming that the references have
already been checked and are valid when using `deepcopy`, we can use a
special value ('*') to skip the valid_refs check.

This will also allow creating new versions of ObservedData objects that
contain related objects, since `new_version` calls `deepcopy`.
2018-02-19 14:44:28 -05:00
Greg Back 126094106e Merge branch 'master' into taxii_collection_source_404 2017-11-29 22:13:16 +00:00
= 742d249ee0 trying to fix timing bug 2017-11-29 12:50:13 -05:00
= 52a052d4dd removing debug lines; attemting to fix a Travis test error 2017-11-29 12:27:20 -05:00
= 2399ee62ec adjusting tests 2017-11-29 12:03:10 -05:00
Greg Back 98ca928dea
Merge pull request #111 from oasis-open/89-relationships
Support de-referencing relationships
2017-11-27 14:19:29 +00:00
Chris Lenk 6446be310c Clean up relationships code 2017-11-21 15:57:35 -05:00
Chris Lenk 92f7e706bf Improve error handling in relationships/related_to 2017-11-21 10:29:57 -05:00
Greg Back f481788e1e
Merge pull request #112 from samcornwell/get_type_from_id
Add get_type_from_id utility function
2017-11-20 15:19:24 +00:00
Sam Cornwell 78612530ff added tests for get_type_from_id 2017-11-19 22:27:31 -05:00
Emmanuelle Vargas-Gonzalez c03ecb5230 Update test modules 2017-11-17 08:50:40 -05:00
Chris Lenk 515ff1e53f Clean up test 2017-11-16 16:50:27 -05:00
Chris Lenk cfa18bfd0d Improve Environment tests 2017-11-16 16:43:27 -05:00
Chris Lenk 29dec997a0 Add related_to()
Function for calling relationships() but instead of just returning the
Relationship objects, returns the STIX objects being refered to in those
Relationships.
2017-11-16 14:58:59 -05:00
Chris Lenk 1b816c3d84 Test relationships() functions 2017-11-15 16:34:07 -05:00
Emmanuelle Vargas-Gonzalez e6a8b555d3 Add test for CustomMarking. closes #109 2017-11-15 13:12:00 -05:00
Chris Lenk f9ad7ceb65 Add relationships() function to Environment 2017-11-13 11:09:56 -05:00
Emmanuelle Vargas-Gonzalez da66f10147 Make DataStore a regular class, remove unwanted overrides, update tests. Remove CustomProperty since it is no longer needed 2017-11-08 13:53:21 -05:00
Emmanuelle Vargas-Gonzalez 489e45ad1b Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into issue-98 2017-11-08 10:31:49 -05:00
Greg Back 5aa8c66bfc
Merge pull request #97 from oasis-open/memory-tests
Test MemoryStore saving/loading to/from file
2017-11-08 14:59:27 +00:00
Emmanuelle Vargas-Gonzalez 19818c8573 Remove stray print() 2017-11-06 14:21:29 -05:00
Emmanuelle Vargas-Gonzalez 0d5859b906 Test other CompositeDataSource operations 2017-11-03 15:13:00 -04:00
Emmanuelle Vargas-Gonzalez 79475586d8 Revert object_properties() to #85 fix. Update tests accordingly 2017-11-03 14:17:36 -04:00
Emmanuelle Vargas-Gonzalez d6c14139f3 Extend object serialization options for _STIXBase 2017-11-03 08:02:32 -04:00
Emmanuelle Vargas-Gonzalez cd6c7982af Update tests related to Datastores 2017-11-02 21:31:56 -04:00
Greg Back 37e9049536
Merge pull request #93 from emmanvg/issue-91
Update stix2 Package Structure
2017-11-01 20:09:15 +00:00
Greg Back f029a01f9a
Merge pull request #95 from oasis-open/filters
Change filters to allow filtering all properties
2017-11-01 20:04:48 +00:00
Emmanuelle Vargas-Gonzalez a17d770d34 Merge master 2017-11-01 14:17:41 -04:00
Chris Lenk 7dd222b202 Test MemoryStore saving/loading to/from file
Python 3 dict.values() returns a view, not a list. See
https://stackoverflow.com/a/17431716/

Fix #65.
2017-11-01 12:51:04 -04:00
Chris Lenk c2d1e9777b Clean up filters
- Simplify an if statement since split() with no matches returns single
  item list
- Rename _all_filter -> _check_property and make it a method on Filter
- Raise an error instead of returning -1
- s/field/property
2017-11-01 10:40:10 -04:00
Chris Lenk d93bf44c00
Merge branch 'master' into 76-filesystem-bundles 2017-10-31 14:10:29 -04:00