@@ -22,6 +22,7 @@ def test_required_only(self):
22
22
data = get_cpe_match_data ()
23
23
data .__delitem__ ("matches" )
24
24
data .__delitem__ ("version_end_including" )
25
+ data .__delitem__ ("cpe_last_modified" )
25
26
26
27
cpe_match_string = CPEMatchString .from_dict (data )
27
28
@@ -37,10 +38,6 @@ def test_required_only(self):
37
38
"Active" ,
38
39
cpe_match_string .status ,
39
40
)
40
- self .assertEqual (
41
- datetime (2019 , 7 , 22 , 16 , 37 , 38 , 133000 , tzinfo = timezone .utc ),
42
- cpe_match_string .cpe_last_modified ,
43
- )
44
41
self .assertEqual (
45
42
datetime (2019 , 6 , 17 , 9 , 16 , 33 , 960000 , tzinfo = timezone .utc ),
46
43
cpe_match_string .created ,
@@ -52,11 +49,21 @@ def test_required_only(self):
52
49
53
50
self .assertEqual ([], cpe_match_string .matches )
54
51
52
+ self .assertIsNone (cpe_match_string .cpe_last_modified )
55
53
self .assertIsNone (cpe_match_string .version_start_excluding )
56
54
self .assertIsNone (cpe_match_string .version_end_excluding )
57
55
self .assertIsNone (cpe_match_string .version_start_including )
58
56
self .assertIsNone (cpe_match_string .version_end_including )
59
57
58
+ def test_cpe_last_modified (self ):
59
+ data = get_cpe_match_data ()
60
+ cpe_match_string = CPEMatchString .from_dict (data )
61
+
62
+ self .assertEqual (
63
+ datetime (2019 , 7 , 22 , 16 , 37 , 38 , 133000 , tzinfo = timezone .utc ),
64
+ cpe_match_string .cpe_last_modified ,
65
+ )
66
+
60
67
def test_matches (self ):
61
68
"""
62
69
Test the matches list of a CPEMatchString
0 commit comments