From f30963fde1bb72ec92c3cc61f98823608948915f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 29 Oct 2018 22:37:15 +0100 Subject: [PATCH] tests/qubespolicy: adjust for removing 'assert' usage --- qubespolicy/tests/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubespolicy/tests/__init__.py b/qubespolicy/tests/__init__.py index 66cb9e5c..8e40b88e 100644 --- a/qubespolicy/tests/__init__.py +++ b/qubespolicy/tests/__init__.py @@ -434,14 +434,14 @@ class TC_10_PolicyAction(qubes.tests.QubesTestCase): def test_002_init_invalid(self): rule_ask = qubespolicy.PolicyRule('@anyvm @anyvm ask') rule_allow = qubespolicy.PolicyRule('@anyvm @anyvm allow') - with self.assertRaises(AssertionError): + with self.assertRaises(qubespolicy.AccessDenied): qubespolicy.PolicyAction('test.service', 'test-vm1', None, rule_allow, 'test-vm2', None) - with self.assertRaises(AssertionError): + with self.assertRaises(qubespolicy.AccessDenied): qubespolicy.PolicyAction('test.service', 'test-vm1', 'test-vm2', rule_allow, 'test-vm2', ['test-vm2', 'test-vm3']) - with self.assertRaises(AssertionError): + with self.assertRaises(qubespolicy.AccessDenied): qubespolicy.PolicyAction('test.service', 'test-vm1', None, rule_ask, 'test-vm2', None)