chg: Force enable debug in test, test update tags

pull/660/head
Raphaël Vinot 2020-11-16 13:39:07 +01:00
parent 3b130bd973
commit c5f8c653c4
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class TestComprehensive(unittest.TestCase):
# Connect as admin
cls.admin_misp_connector = PyMISP(url, key, verifycert, debug=False)
cls.admin_misp_connector.set_server_setting('Security.allow_self_registration', True, force=True)
cls.admin_misp_connector.set_server_setting('debug', 1, force=True)
if not fast_mode:
r = cls.admin_misp_connector.update_misp()
print(r)
@ -1395,6 +1396,11 @@ class TestComprehensive(unittest.TestCase):
tags = self.admin_misp_connector.search_tags('not a tag')
self.assertFalse(tags)
# Update tag
non_exportable_tag.name = 'non-exportable tag - edit'
non_exportable_tag_edited = self.admin_misp_connector.update_tag(non_exportable_tag, pythonify=True)
self.assertTrue(non_exportable_tag_edited.name == 'non-exportable tag - edit', non_exportable_tag_edited.to_json(indent=2))
# Delete tag
response = self.admin_misp_connector.delete_tag(new_tag)
self.assertEqual(response['message'], 'Tag deleted.')