14
0
forked from pool/python-jirafs

Accepting request 1138195 from devel:languages:python

- Refresh remove-mock.patch from upstream to also support Python 3.12.

OBS-URL: https://build.opensuse.org/request/show/1138195
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jirafs?expand=0&rev=10
This commit is contained in:
2024-01-12 22:45:30 +00:00
committed by Git OBS Bridge
3 changed files with 22 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jan 12 02:16:58 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Refresh remove-mock.patch from upstream to also support Python 3.12.
-------------------------------------------------------------------
Fri Jun 2 06:06:23 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-jirafs
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@@ -1,11 +1,12 @@
From 2aa5e4620920f51a9ad4e3ade05b45e88aaf7155 Mon Sep 17 00:00:00 2001
From 9acae1e687078a1012d62641087c9d78a7be8925 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Fri, 2 Jun 2023 15:47:09 +1000
Date: Fri, 12 Jan 2024 13:15:14 +1100
Subject: [PATCH] Switch to unittest.mock
Python 3.3+ has included mock in the standard library, under the
unittest module. Switch to using that, rather than the external mock
library.
library. As a drive-by, stop using a deprecated assertion call in
one callsite.
Fixes #69
---
@@ -14,9 +15,9 @@ Fixes #69
tests/commands/test_push.py | 2 +-
tests/test_command_result.py | 2 +-
tests/test_plugins.py | 4 ++--
tests/test_ticketfolder.py | 4 ++--
tests/test_ticketfolder.py | 6 +++---
tests/test_utils.py | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 76a9d96..1bcbae1 100644
@@ -82,7 +83,7 @@ index e1af5bf..f165874 100644
from jirafs.plugin import MacroPlugin
from jirafs.utils import run_command_method_with_kwargs
diff --git a/tests/test_ticketfolder.py b/tests/test_ticketfolder.py
index f93d2b7..eba31d6 100644
index f93d2b7..96ad341 100644
--- a/tests/test_ticketfolder.py
+++ b/tests/test_ticketfolder.py
@@ -4,9 +4,9 @@
@@ -97,6 +98,15 @@ index f93d2b7..eba31d6 100644
from jirafs import exceptions
from jirafs.jirafieldmanager import JiraFieldManager
@@ -63,7 +63,7 @@ def test_get_fields(self):
expected_result = json.loads(self.get_asset_contents("basic.status.json"))
- self.assertEquals(actual_result, expected_result)
+ self.assertEqual(actual_result, expected_result)
def test_fetch(self):
self.ticketfolder._issue = self.rehydrate_issue("test_fetch/fetched.json")
diff --git a/tests/test_utils.py b/tests/test_utils.py
index c26246f..7c9e41e 100644
--- a/tests/test_utils.py