@@ -41,16 +41,12 @@ def test_identify_md5_hash(self):
4141
4242 def test_identify_sha1_hash (self ):
4343 """Test SHA1 hash identification"""
44- result = self .analyzer .identify_ioc_type (
45- "da39a3ee5e6b4b0d3255bfef95601890afd80709"
46- )
44+ result = self .analyzer .identify_ioc_type ("da39a3ee5e6b4b0d3255bfef95601890afd80709" )
4745 assert result == "sha1"
4846
4947 def test_identify_sha256_hash (self ):
5048 """Test SHA256 hash identification"""
51- result = self .analyzer .identify_ioc_type (
52- "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
53- )
49+ result = self .analyzer .identify_ioc_type ("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" )
5450 assert result == "sha256"
5551
5652 def test_identify_unknown (self ):
@@ -133,12 +129,8 @@ def test_aggregate_threats(self):
133129 self .feed .add_feed ("feed1" , "https://example.com/feed1" )
134130 self .feed .add_feed ("feed2" , "https://example.com/feed2" )
135131
136- self .feed .update_feed (
137- "feed1" , {"threats" : [{"ip" : "1.2.3.4" , "severity" : "high" }]}
138- )
139- self .feed .update_feed (
140- "feed2" , {"threats" : [{"domain" : "evil.com" , "severity" : "medium" }]}
141- )
132+ self .feed .update_feed ("feed1" , {"threats" : [{"ip" : "1.2.3.4" , "severity" : "high" }]})
133+ self .feed .update_feed ("feed2" , {"threats" : [{"domain" : "evil.com" , "severity" : "medium" }]})
142134
143135 threats = self .feed .aggregate_threats ()
144136 assert len (threats ) == 2
@@ -168,9 +160,7 @@ def test_remove_nonexistent_feed(self):
168160 def test_fetch_indicators (self ):
169161 """Test fetching indicators"""
170162 self .feed .add_feed ("test_feed" , "https://example.com/feed" )
171- self .feed .update_feed (
172- "test_feed" , {"threats" : [{"ip" : "1.2.3.4" , "severity" : "high" }]}
173- )
163+ self .feed .update_feed ("test_feed" , {"threats" : [{"ip" : "1.2.3.4" , "severity" : "high" }]})
174164 indicators = self .feed .fetch_indicators ()
175165 assert len (indicators ) == 1
176166 assert indicators [0 ]["ip" ] == "1.2.3.4"
0 commit comments