Commit Graph

963 Commits (aa649d4727c6fb032f242fcc01de9be9171da67f)

Author SHA1 Message Date
Emmanuelle Vargas-Gonzalez 48e0442439 Fix tests in 'test_properties.py' 2018-07-10 16:10:01 -04:00
Emmanuelle Vargas-Gonzalez d24cddb547 Temporarily skip failing tests in workbench for v20, but the approach needs to be fixed 2018-07-10 16:08:36 -04:00
Emmanuelle Vargas-Gonzalez 4583da3ef2 Sort imports 2018-07-10 16:05:30 -04:00
Emmanuelle Vargas-Gonzalez ce42c02cee Fix tests that use property objects to call in the right path 2018-07-10 15:56:22 -04:00
Emmanuelle Vargas-Gonzalez 8cf68054d4 Remove str() as a way to serialize objects. Add support for encodings and Bundle versions. 2018-07-10 15:51:20 -04:00
Emmanuelle Vargas-Gonzalez 012eba4e9b Add new Bundle support for add_objects() request. Add encoding support.
Removed the version from all methods since it is no longer necessary.
2018-07-10 15:49:36 -04:00
Emmanuelle Vargas-Gonzalez 9b8cb09b1a Remove 'version' from calls to parse since it is no longer necessary
Also, fixed adding STIX2 Bundles to MemorySource. Enhancements to 'save_to_file'. Fix docstrings and encoding support when writing to file. closes #202
2018-07-10 15:43:58 -04:00
Emmanuelle Vargas-Gonzalez b6fefc52d9 Fix call to collect STIX2 mappings, make parse_observable available 2018-07-10 15:31:22 -04:00
Emmanuelle Vargas-Gonzalez 8d378fcf81 Remove STIXRelationshipObject from 'sro.py' 2018-07-10 15:27:05 -04:00
Emmanuelle Vargas-Gonzalez 023603d86f Remove duplicate code from 'sdo.py', removed STIXDomainObject
Apply proper 'spec_version' constraints to v21 objects
2018-07-10 15:22:21 -04:00
Emmanuelle Vargas-Gonzalez 54268ae7dd Remove observables and extension mappings, custom code and apply property constrain in v21 2018-07-10 15:20:16 -04:00
Emmanuelle Vargas-Gonzalez 1177694739 Adding docstrings to 2.1 objects 2018-07-10 15:15:33 -04:00
Emmanuelle Vargas-Gonzalez b722fdc0ed Remove duplicate register methods and CustomMarking code 2018-07-10 15:07:08 -04:00
Emmanuelle Vargas-Gonzalez 5332d54383 Refactor Bundle
Removed redundant STIXObjectProperty, for 2.1 use validation specific to that version
2018-07-10 15:02:55 -04:00
Emmanuelle Vargas-Gonzalez 78d77254ae Add object mappings in the top of each version package 2018-07-10 14:59:43 -04:00
Emmanuelle Vargas-Gonzalez 03e19f197c Moved STIXDomainObject and STIXRelationshipObject here, the observable
parsing code, minor changes to the mappings collections and all _register methods
2018-07-10 14:56:31 -04:00
Emmanuelle Vargas-Gonzalez b76888c682 Add a new 'custom.py' module to store and consolidate all custom code 2018-07-10 14:54:17 -04:00
Emmanuelle Vargas-Gonzalez f669656a4d Removed 'ExtensionsProperty' from workbench. 2018-07-10 14:52:10 -04:00
Emmanuelle Vargas-Gonzalez 7da6f1ed88 Add a package-wide 'properties.py'
Consolidated STIXObjectProperty, ExtensionsProperty, ObservableProperty code. Also added a 'spec_version' to allow validation changes per spec.
2018-07-10 14:50:03 -04:00
Emmanuelle Vargas-Gonzalez fe64fb044f Removed per version 'properties.py' 2018-07-10 14:47:30 -04:00
Emmanuelle Vargas-Gonzalez 645a258c62 Fix file indentation 2018-07-10 14:46:46 -04:00
Emmanuelle Vargas-Gonzalez 99e76c26ae Update Tox test configuration 2018-07-10 14:39:20 -04:00
Emmanuelle Vargas-Gonzalez edd7148e3c It appears we did not support the case when the Bundle contains 'utf-8' 2018-07-09 15:26:57 -04:00
Emmanuelle Vargas-Gonzalez 70a1e9522b Add 'stix2_data' test directory for v20 tests 2018-07-09 15:22:08 -04:00
Emmanuelle Vargas-Gonzalez 0197f9fd17 Minor fixes to tests. Some datastore had strange parameters in calls.
Fix error values for CustomMarking and fix incorrect test data
2018-07-09 15:20:04 -04:00
Emmanuelle Vargas-Gonzalez 646d941032 Removed 'test_memory' file and moved all tests into 'test_datastore_memory'
The tests under 'test_memory' were moved into a new file called 'test_datastore_composite' to make clear what we are testing.
2018-07-09 15:15:29 -04:00
Emmanuelle Vargas-Gonzalez 546216c396 Remove unnecessary 'True' in Memory datastore tests. 2018-07-09 15:07:05 -04:00
Emmanuelle Vargas-Gonzalez 8aeac369f4 Returning double quotes here... went overboard. 2018-07-09 14:59:19 -04:00
Emmanuelle Vargas-Gonzalez 21d5451d1c Small changes to tests 2018-07-06 14:11:59 -04:00
Emmanuelle Vargas-Gonzalez 52c1850655 Small addition to patterns.py 2018-07-06 14:08:49 -04:00
Greg Back 68aac583c9
Merge pull request #204 from oasis-open/refactor-properties
Refactor Properties
2018-07-05 17:16:25 -05:00
Greg Back 23925017a7 Add LICENSE to wheel distribution. 2018-07-05 16:23:15 -05:00
Greg Back 49c1931b4b
Merge pull request #203 from oasis-open/200-filter-contains
Add "contains" filter
2018-07-05 15:47:09 -05:00
Emmanuelle Vargas-Gonzalez 5be1636b10 Update v20 tests to ensure right methods and classes are used 2018-07-05 15:23:25 -04:00
Emmanuelle Vargas-Gonzalez 2c5ddc14af Update v21 tests for some missing methods, ensure we are calling and
using the right classes.
2018-07-05 15:21:09 -04:00
Greg Back 7c8113a4d9
Merge pull request #201 from oasis-open/188-uuidv4
Ensure all UUIDs are V4
2018-07-05 11:46:44 -05:00
Greg Back 12a22c0939 Remove unnecessary code related to defining properties. 2018-07-05 11:39:44 -05:00
Greg Back 25409b2099 GH-188: Update error message for invalid IDs. 2018-07-05 11:25:48 -05:00
Emmanuelle Vargas-Gonzalez bfa86bf87e Format objects in observed_data 2018-07-03 10:32:04 -04:00
Emmanuelle Vargas-Gonzalez 04680d8a3d First pass at making sure everything uses v21 classes and representations 2018-07-03 09:40:51 -04:00
Emmanuelle Vargas-Gonzalez 3100fa1fb8 Move v20 tests to their own package 2018-07-03 07:02:57 -04:00
Emmanuelle Vargas-Gonzalez da5b16dc2f Create v21 test package with new spec changes 2018-07-03 07:00:18 -04:00
Chris Lenk f47809eaaf Add "contains" filter
This allows filtering on, for example, observed-data objects that
contain a specific cyber observable.
2018-07-02 18:28:27 -04:00
Emmanuelle Vargas-Gonzalez c2f5a40986 Create new test subpackages 2018-06-30 19:36:54 -04:00
Emmanuelle Vargas-Gonzalez 2e6bb74be8 Add spec version 2.1 to object missing the property. 2018-06-29 18:48:41 -04:00
Emmanuelle Vargas-Gonzalez 7fd379d0b5 Minor style changes.
Removed OrderedDict and update()... Also a lot of single quoting except for errors
2018-06-29 18:38:04 -04:00
Greg Back 0f5d35f82d
Merge pull request #199 from oasis-open/emmanvg-patch-1
Update base.py
2018-06-27 14:13:33 -05:00
Greg Back a2e2407025 GH-188: Fixes for old Python syntax. 2018-06-27 12:49:00 -05:00
Greg Back d2f703b9d0 Reuse reference regex to match IDs as well.
Note that this means that UUIDs will no longer be converted, even when
there's an unambiguous mapping.
2018-06-27 12:27:44 -05:00
Greg Back e749218f9b GH-188: Test that references are always valid UUID v4. 2018-06-27 12:02:13 -05:00