mirror of https://github.com/MISP/PyMISP
parent
204fd6ba8c
commit
8c2bbaa13c
|
@ -179,6 +179,10 @@ class ExpandedPyMISP(PyMISP):
|
||||||
response = self._prepare_request('POST', f'/servers/restartWorkers')
|
response = self._prepare_request('POST', f'/servers/restartWorkers')
|
||||||
return self._check_response(response, expect_json=True)
|
return self._check_response(response, expect_json=True)
|
||||||
|
|
||||||
|
def db_schema_diagnostic(self):
|
||||||
|
response = self._prepare_request('GET', f'/servers/dbSchemaDiagnostic')
|
||||||
|
return self._check_response(response, expect_json=True)
|
||||||
|
|
||||||
def toggle_global_pythonify(self):
|
def toggle_global_pythonify(self):
|
||||||
self.global_pythonify = not self.global_pythonify
|
self.global_pythonify = not self.global_pythonify
|
||||||
|
|
||||||
|
|
|
@ -1561,6 +1561,10 @@ class TestComprehensive(unittest.TestCase):
|
||||||
self.assertEqual(entry.action, 'edit')
|
self.assertEqual(entry.action, 'edit')
|
||||||
r = self.admin_misp_connector.update_user({'email': 'testusr@user.local'}, self.test_usr)
|
r = self.admin_misp_connector.update_user({'email': 'testusr@user.local'}, self.test_usr)
|
||||||
|
|
||||||
|
def test_db_schema(self):
|
||||||
|
diag = self.admin_misp_connector.db_schema_diagnostic()
|
||||||
|
self.assertEqual(diag['actual_db_version'], diag['expected_db_version'], diag)
|
||||||
|
|
||||||
def test_live_acl(self):
|
def test_live_acl(self):
|
||||||
missing_acls = self.admin_misp_connector.remote_acl()
|
missing_acls = self.admin_misp_connector.remote_acl()
|
||||||
self.assertEqual(missing_acls, [], msg=missing_acls)
|
self.assertEqual(missing_acls, [], msg=missing_acls)
|
||||||
|
|
Loading…
Reference in New Issue