Change relational-data-sink class scanning to scan the registry #625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This simple PR shows the changes I made to class scanning to get unit tests running under tox again. The unit tests seem to run normally in the github runner now. They don't all pass though. This PR doesn't include the fixes to the unit tests; I wanted to have a simple PR which just shows the changes I made to get to the point where we could start addressing individual unit tests.
Class scanning is changed to look at the stix2 lib's registry. So it will only find classes which have been registered. I think it's better that way anyway. I had to hack around the workbench's patching of the registry. I think most of the time it won't be an issue in practice since probably most people don't use the workbench. But the unit tests include tests of the workbench, which causes the workbench module to be imported, which is what triggers the registry patching. So we needed a way to deal with that for unit testing, unfortunately.