# Copyright (c) 2022, XhiveFramework Technologies and contributors
# For license information, please see license.txt


from xhiveframework.custom.report.audit_system_hooks.audit_system_hooks import execute
from xhiveframework.tests.utils import XhiveFrameworkTestCase


class TestAuditSystemHooksReport(XhiveFrameworkTestCase):
	def test_basic_query(self):
		_, data = execute()
		for row in data:
			if row.get("hook_name") == "app_name":
				self.assertEqual(row.get("hook_values"), "xhiveframework")
				break
		else:
			self.fail("Failed to generate hooks report")
