-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fix for issue #572 #607
Fix for issue #572 #607
Conversation
… error on those values Signed-off-by: HackerShark <[email protected]>
…and latitude Signed-off-by: HackerShark <[email protected]>
Signed-off-by: HackerShark <[email protected]>
Signed-off-by: HackerShark <[email protected]>
Seems line two tests failed this time. Before you push again, run the tests in pycharm. Just click right on test-location.py and select test |
Signed-off-by: HackerShark <[email protected]>
Some other test, not in test-location.py, failed . Can you look into that? |
It seems to be failing in the v20 tests Any progress? |
…in behavior caused the fail because is_encrypted is set to False which is a falsy value. Adjusted the code to handle both None and other falsy values Signed-off-by: HackerShark <[email protected]>
Tested the code locally and it passed. This fix should be correct. |
Some minor style issues. If you fix them I can merge :-) |
Signed-off-by: HackerShark <[email protected]>
This is still incorrect. A boolean property can be class FalseyTest(_STIXBase):
_type = "falsey"
_properties = {
"type": TypeProperty(_type, spec_version='2.1'),
"id": IDProperty(_type, spec_version='2.1'),
"foo": StringProperty(),
"falsey1": BooleanProperty(),
}
def _check_object_constraints(self):
super()._check_object_constraints()
super()._check_properties_dependency(["falsey1"], ["foo"])
# Should not throw since both props are present.
FalseyTest(foo="bar", falsey1=False) still yields:
The problem is that a falsey test was done in a context where it did not correctly substitute for a presence test. Sometimes you can get away with that, sometimes you can't. A direct presence test is better here, e.g. |
…e property that way it won't incorrectly raise a DependentPropertiesError Signed-off-by: HackerShark <[email protected]>
@HackerShark - still some linty errors - see tox run. @chisholm - when Mo fixed these errors, and you review his change for me? |
Issue #572 errors when longitude or latitude has a 0 value. This fix takes into account 0 values for longitude and latitude.