fix: Let's act as if python2 doesn't exists.

pull/362/head
Raphaël Vinot 2019-02-27 22:02:12 -08:00
parent e688a3e99f
commit 227a6e8926
1 changed files with 21 additions and 18 deletions

View File

@ -12,6 +12,11 @@ import time
manual_testing = False manual_testing = False
if sys.version_info < (3, 6):
print('This test suite requires Python 3.6+, breaking.')
sys.exit(0)
class TestMISPEvent(unittest.TestCase): class TestMISPEvent(unittest.TestCase):
def setUp(self): def setUp(self):
@ -28,7 +33,6 @@ class TestMISPEvent(unittest.TestCase):
self.storage_image_folder = self.root + "reportlab_test_image_outputs/" self.storage_image_folder = self.root + "reportlab_test_image_outputs/"
self.moduleconfig = ["MISP_base_url_for_dynamic_link", "MISP_name_for_metadata", "Activate_textual_description"] self.moduleconfig = ["MISP_base_url_for_dynamic_link", "MISP_name_for_metadata", "Activate_textual_description"]
def init_event(self): def init_event(self):
self.mispevent.info = 'This is a test' self.mispevent.info = 'This is a test'
self.mispevent.distribution = 1 self.mispevent.distribution = 1
@ -212,7 +216,6 @@ class TestMISPEvent(unittest.TestCase):
reportlab_generator.register_value_to_file(reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config), reportlab_generator.register_value_to_file(reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
self.storage_folder + "textual.pdf") self.storage_folder + "textual.pdf")
def test_batch_image_events(self): def test_batch_image_events(self):
# Test case ONLY for manual testing. Needs to download a full list of image events ! # Test case ONLY for manual testing. Needs to download a full list of image events !