Beispiel #1
0
	def _apply_rules(self, process):
		parent = process.parent
		rule = Rules.find(parent.name)

		if not rule or not rule["action"]:
			return process

		if rule["action"] == Rules.ACTIONS["CALL-PARENT"]:
			return self._apply_rules(parent)

		# Only PRINT action left
		# PRINT rule is defined for parent process
		return parent
Beispiel #2
0
	def test_app_with_no_rule(self):
		self.assertIsNone(Rules.find("NON_EXISTING_APPLICATION"))