Work-around error text changes

https://github.com/martinpitt/python-dbusmock/issues/74
This commit is contained in:
Bastien Nocera 2021-06-14 12:51:50 +02:00
parent 158c4f9165
commit fb4bed534e
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,37 @@
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

View File

@ -18,6 +18,9 @@ BuildRequires: python3-gobject
BuildRequires: dbus-x11
BuildRequires: upower
# https://github.com/martinpitt/python-dbusmock/issues/74
Patch0: 0001-Work-around-error-text-changes.patch
%global _description\
With this program/Python library you can easily create mock objects on\
D-Bus. This is useful for writing tests for software which talks to\