fix import error
parent
191b14a4bb
commit
29871427b7
|
@ -9,7 +9,7 @@ from .base import _Observable, _STIXBase
|
|||
from .properties import (BinaryProperty, BooleanProperty, DictionaryProperty,
|
||||
EmbeddedObjectProperty, EnumProperty, HashesProperty,
|
||||
HexProperty, IntegerProperty, ListProperty,
|
||||
ObjectReferenceProperty, Property, StringProperty,
|
||||
ObjectReferenceProperty, StringProperty,
|
||||
TimestampProperty, TypeProperty)
|
||||
|
||||
|
||||
|
@ -305,9 +305,9 @@ class WindowsRegistryKey(_Observable):
|
|||
|
||||
@property
|
||||
def values(self):
|
||||
# Needed because 'values' is a property on collections.Mapping objects
|
||||
# Needed because 'values' is a property on collections.Mapping objects
|
||||
return self._inner['values']
|
||||
|
||||
|
||||
|
||||
class X509V3ExtenstionsType(_STIXBase):
|
||||
_type = 'x509-v3-extensions-type'
|
||||
|
@ -329,7 +329,7 @@ class X509V3ExtenstionsType(_STIXBase):
|
|||
'certificate_policies': StringProperty(),
|
||||
'policy_mappings': StringProperty(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
class X509Certificate(_Observable):
|
||||
_type = 'x509-certificate'
|
||||
|
|
|
@ -587,7 +587,7 @@ def test_software_example():
|
|||
assert s.version == "2002"
|
||||
assert s.vendor == "Microsoft"
|
||||
|
||||
|
||||
|
||||
def test_url_example():
|
||||
s = stix2.URL(value="https://example.com/research/index.html")
|
||||
|
||||
|
@ -619,8 +619,8 @@ def test_user_account_example():
|
|||
assert a.password_last_changed == dt.datetime(2016, 1, 20, 14, 27, 43, tzinfo=pytz.utc)
|
||||
assert a.account_first_login == dt.datetime(2016, 1, 20, 14, 26, 7, tzinfo=pytz.utc)
|
||||
assert a.account_last_login == dt.datetime(2016, 7, 22, 16, 8, 28, tzinfo=pytz.utc)
|
||||
|
||||
|
||||
|
||||
|
||||
def test_windows_registry_key_example():
|
||||
with pytest.raises(ValueError):
|
||||
v = stix2.WindowsRegistryValueType(name="Foo",
|
||||
|
@ -648,4 +648,3 @@ def test_x509_certificate_example():
|
|||
assert x509.type == "x509-certificate"
|
||||
assert x509.issuer == "C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/emailAddress=server-certs@thawte.com" # noqa
|
||||
assert x509.subject == "C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/emailAddress=baccala@freesoft.org" # noqa
|
||||
|
||||
|
|
Loading…
Reference in New Issue