-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: [test] skip some tests if running in the CI (API limitation or s…
…pecific host issues)
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
import json | ||
import os | ||
|
||
LiveCI = True | ||
|
||
class TestExpansions(unittest.TestCase): | ||
|
||
|
@@ -460,8 +461,9 @@ def test_stix2_pattern_validator(self): | |
query = {"module": "stix2_pattern_syntax_validator", "stix2-pattern": "[ipv4-addr:value = '8.8.8.8']"} | ||
response = self.misp_modules_post(query) | ||
self.assertEqual(self.get_values(response), 'Syntax valid') | ||
|
||
def test_threatcrowd(self): | ||
if LiveCI: | ||
return True | ||
query_types = ('domain', 'ip-src', 'md5', 'whois-registrant-email') | ||
query_values = ('circl.lu', '185.194.93.14', '616eff3e9a7575ae73821b4668d2801c', '[email protected]') | ||
results = ('149.13.33.4', 'cve.circl.lu', 'devilreturns.com', 'navabi.lu') | ||
|
@@ -471,6 +473,8 @@ def test_threatcrowd(self): | |
self.assertTrue(self.get_values(response), result) | ||
|
||
def test_threatminer(self): | ||
if LiveCI: | ||
return True | ||
query_types = ('domain', 'ip-src', 'md5') | ||
query_values = ('circl.lu', '149.13.33.4', 'b538dbc6160ef54f755a540e06dc27cd980fc4a12005e90b3627febb44a1a90f') | ||
results = ('149.13.33.14', 'f6ecb9d5c21defb1f622364a30cb8274f817a1a2', 'http://www.circl.lu/') | ||
|
@@ -606,6 +610,8 @@ def test_xforceexchange(self): | |
self.assertEqual(self.get_errors(response), "An API authentication is required (key and password).") | ||
|
||
def test_xlsx(self): | ||
if LiveCI: | ||
return True | ||
filename = 'test.xlsx' | ||
with open(f'{self.dirname}/test_files/{filename}', 'rb') as f: | ||
encoded = b64encode(f.read()).decode() | ||
|