Skip to content

Commit d5cf82f

Browse files
committed
chg: [test] skip some tests if running in the CI (API limitation or specific host issues)
1 parent 513e8ea commit d5cf82f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_expansions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import json
99
import os
1010

11+
LiveCI = True
1112

1213
class TestExpansions(unittest.TestCase):
1314

@@ -460,8 +461,9 @@ def test_stix2_pattern_validator(self):
460461
query = {"module": "stix2_pattern_syntax_validator", "stix2-pattern": "[ipv4-addr:value = '8.8.8.8']"}
461462
response = self.misp_modules_post(query)
462463
self.assertEqual(self.get_values(response), 'Syntax valid')
463-
464464
def test_threatcrowd(self):
465+
if LiveCI:
466+
return True
465467
query_types = ('domain', 'ip-src', 'md5', 'whois-registrant-email')
466468
query_values = ('circl.lu', '185.194.93.14', '616eff3e9a7575ae73821b4668d2801c', '[email protected]')
467469
results = ('149.13.33.4', 'cve.circl.lu', 'devilreturns.com', 'navabi.lu')
@@ -471,6 +473,8 @@ def test_threatcrowd(self):
471473
self.assertTrue(self.get_values(response), result)
472474

473475
def test_threatminer(self):
476+
if LiveCI:
477+
return True
474478
query_types = ('domain', 'ip-src', 'md5')
475479
query_values = ('circl.lu', '149.13.33.4', 'b538dbc6160ef54f755a540e06dc27cd980fc4a12005e90b3627febb44a1a90f')
476480
results = ('149.13.33.14', 'f6ecb9d5c21defb1f622364a30cb8274f817a1a2', 'http://www.circl.lu/')
@@ -606,6 +610,8 @@ def test_xforceexchange(self):
606610
self.assertEqual(self.get_errors(response), "An API authentication is required (key and password).")
607611

608612
def test_xlsx(self):
613+
if LiveCI:
614+
return True
609615
filename = 'test.xlsx'
610616
with open(f'{self.dirname}/test_files/{filename}', 'rb') as f:
611617
encoded = b64encode(f.read()).decode()

0 commit comments

Comments
 (0)