From 6cf48b4a421d4c9d615e0b352d74d065541de119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 14 Feb 2024 17:35:31 +0100 Subject: [PATCH] tests: Use python unittest assertions instead of native ones --- tests/integration_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration_test.py b/tests/integration_test.py index 74eaed3..ba8ee22 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -1143,8 +1143,8 @@ class Tests(dbusmock.DBusTestCase): {"DaemonVersion": "0.99", "OnBattery": False}, stdout=subprocess.PIPE, ) - assert upowerd - assert obj_upower + self.assertTrue(upowerd) + self.assertTrue(obj_upower) self.start_daemon() @@ -1746,7 +1746,7 @@ class Tests(dbusmock.DBusTestCase): stdout=sys.stdout, stderr=sys.stderr, ) as launch_process: - assert launch_process + self.assertTrue(launch_process) time.sleep(1) holds = self.get_dbus_property("ActiveProfileHolds") self.assertEqual(len(holds), 1) @@ -1851,7 +1851,7 @@ class Tests(dbusmock.DBusTestCase): performance_cookie = self.call_dbus_method( "HoldProfile", GLib.Variant("(sss)", ("performance", "", "")) ) - assert performance_cookie + self.assertTrue(performance_cookie) self.assertEqual(self.get_dbus_property("ActiveProfile"), "performance") self.stop_daemon()