38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From e0f4a08a1ed9fce9d693010641c2f40345b47f7c Mon Sep 17 00:00:00 2001
|
|
From: Bastien Nocera <hadess@hadess.net>
|
|
Date: Mon, 14 Jun 2021 13:02:17 +0200
|
|
Subject: [PATCH 1/2] Work-around error text changes
|
|
|
|
https://github.com/martinpitt/python-dbusmock/issues/74
|
|
---
|
|
tests/test_api.py | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tests/test_api.py b/tests/test_api.py
|
|
index c042e69..0766d91 100644
|
|
--- a/tests/test_api.py
|
|
+++ b/tests/test_api.py
|
|
@@ -202,7 +202,8 @@ assert args[2] == 5
|
|
|
|
# type mismatch
|
|
check('u', [-1], 'convert negative value to unsigned')
|
|
- check('i', ['hello'], 'TypeError: an integer is required')
|
|
+ check('i', ['hello'], 'object cannot be interpreted as an integer')
|
|
+ check('i', ['hello'], 'TypeError')
|
|
check('s', [1], 'TypeError: Expected a string')
|
|
|
|
def test_add_object(self):
|
|
@@ -527,7 +528,8 @@ assert args[2] == 5
|
|
|
|
# type mismatch
|
|
check('u', [-1], 'convert negative value to unsigned')
|
|
- check('i', ['hello'], 'TypeError: an integer is required')
|
|
+ check('i', ['hello'], 'object cannot be interpreted as an integer')
|
|
+ check('i', ['hello'], 'TypeError')
|
|
check('s', [1], 'TypeError: Expected a string')
|
|
|
|
def test_dbus_get_log(self):
|
|
--
|
|
2.31.1
|
|
|