1515
1616
1717class TypesTests (TypedListTestCase , unittest .TestCase ):
18- klass = ta ._Types
18+ klass = ta .ThreatActor
1919
20- _full_dict = [
20+ _partial_dict = [
2121 {
2222 'value' : {
2323 "value" : "Hacker" ,
@@ -26,58 +26,74 @@ class TypesTests(TypedListTestCase, unittest.TestCase):
2626 },
2727 ]
2828
29+ _full_dict = {
30+ "types" : _partial_dict
31+ }
2932
3033class MotivationsTests (TypedListTestCase , unittest .TestCase ):
31- klass = ta ._Motivations
34+ klass = ta .ThreatActor
3235
33- _full_dict = [
34- {
36+ _partial_dict = [{
3537 'value' : {
3638 "value" : "Ego" ,
3739 "xsi:type" : "stixVocabs:MotivationVocab-1.1"
3840 }
39- },
40- ]
41+ }]
42+
43+ _full_dict = {
44+ "motivations" : _partial_dict
45+ }
4146
4247
4348class SophisticationTests (TypedListTestCase , unittest .TestCase ):
44- klass = ta ._Sophistications
49+ klass = ta .ThreatActor
4550
46- _full_dict = [
51+ _partial_dict = [
4752 {
48- 'value' : {
53+ 'value' : {
4954 "value" : "Novice" ,
5055 "xsi:type" : "stixVocabs:ThreatActorSophisticationVocab-1.0"
51- }
52- },
56+ }
57+ }
5358 ]
5459
55-
60+ _full_dict = {
61+ "sophistications" : _partial_dict
62+ }
63+
5664class IntendedEffectsTests (TypedListTestCase , unittest .TestCase ):
57- klass = ta ._IntendedEffects
65+ klass = ta .ThreatActor
5866
59- _full_dict = [
67+ _partial_dict = [
6068 {
61- 'value' : {
69+ 'value' : {
6270 "value" : "Destruction" ,
6371 "xsi:type" : "stixVocabs:IntendedEffectVocab-1.0"
64- }
72+ }
6573 }
6674 ]
75+
76+ _full_dict = {
77+ "intended_effects" : _partial_dict
78+ }
6779
6880
6981class PlanningAndOperationalSupportTests (TypedListTestCase , unittest .TestCase ):
70- klass = ta ._PlanningAndOperationalSupports
82+ klass = ta .ThreatActor
7183
72- _full_dict = [
84+ _partial_dict = [
7385 {
74- 'value' : {
75- "value" : "Data Exploitation" ,
76- "xsi:type" : 'stixVocabs:PlanningAndOperationalSupportVocab-1.0.1'
77- }
78- },
86+ 'value' : {
87+ "value" : "Data Exploitation" ,
88+ "xsi:type" : 'stixVocabs:PlanningAndOperationalSupportVocab-1.0.1'
89+ }
90+ }
7991 ]
8092
93+ _full_dict = {
94+ "planning_and_operational_supports" : _partial_dict
95+ }
96+
8197
8298class ObservedTTPsTests (EntityTestCase , unittest .TestCase ):
8399 klass = ta .ObservedTTPs
@@ -122,11 +138,11 @@ class ThreatActorTests(EntityTestCase, unittest.TestCase):
122138 'description' : "This is a long description about a threat actor." ,
123139 'short_description' : "A bad guy" ,
124140 'identity' : identity_test .IdentityTests ._full_dict ,
125- 'types' : TypesTests ._full_dict ,
126- 'motivations' : MotivationsTests ._full_dict ,
127- 'sophistications' : SophisticationTests ._full_dict ,
128- 'intended_effects' : IntendedEffectsTests ._full_dict ,
129- 'planning_and_operational_supports' : PlanningAndOperationalSupportTests ._full_dict ,
141+ 'types' : TypesTests ._partial_dict ,
142+ 'motivations' : MotivationsTests ._partial_dict ,
143+ 'sophistications' : SophisticationTests ._partial_dict ,
144+ 'intended_effects' : IntendedEffectsTests ._partial_dict ,
145+ 'planning_and_operational_supports' : PlanningAndOperationalSupportTests ._partial_dict ,
130146 'observed_ttps' : ObservedTTPsTests ._full_dict ,
131147 'associated_campaigns' : AssocaitedCampaignsTests ._full_dict ,
132148 'associated_actors' : AssociatedActorsTests ._full_dict ,
0 commit comments