diff --git a/0001-Fix-test-for-deprecated-args.patch b/0001-Fix-test-for-deprecated-args.patch new file mode 100644 index 0000000..8559507 --- /dev/null +++ b/0001-Fix-test-for-deprecated-args.patch @@ -0,0 +1,28 @@ +From 02be99b227b05248125fccb5551bed75c9447917 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 14 Nov 2015 10:29:10 -0500 +Subject: [PATCH] Fix test for deprecated args + +Apparently there is no mock function assert_called_once. Python 3.5 +started failing with non-existent calls to assert*. Under previous +versions this call wasn't doing anything. +--- + tests/test_system_upgrade.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_system_upgrade.py b/tests/test_system_upgrade.py +index d47b19cdc9..f43d20e545 100644 +--- a/tests/test_system_upgrade.py ++++ b/tests/test_system_upgrade.py +@@ -188,7 +188,7 @@ class ArgparseTestCase(unittest.TestCase): + def assert_warning(self, args): + with mock.patch('system_upgrade.logger.warning') as warning: + self.cmd.parse_args(args) +- warning.assert_called_once() ++ self.assertTrue(warning.called) + + def assert_error(self, args, message): + with self.assertRaises(CliError) as cm: +-- +2.6.3 + diff --git a/dnf-plugin-system-upgrade.spec b/dnf-plugin-system-upgrade.spec index e9bd344..efa7d09 100644 --- a/dnf-plugin-system-upgrade.spec +++ b/dnf-plugin-system-upgrade.spec @@ -6,6 +6,7 @@ Group: System Environment/Base License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugin-system-upgrade Source0: https://github.com/rpm-software-management/dnf-plugin-system-upgrade/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 0001-Fix-test-for-deprecated-args.patch %if 0%{?fedora} >= 23 # DNF in Fedora 23 uses Python 3 by default @@ -62,7 +63,7 @@ System Upgrade plugin for DNF (Python 2 version). This package provides the "system-upgrade" command. %prep -%setup -q -n %{name}-%{version} +%autosetup -p1 %build make %{?_smp_mflags} @@ -111,7 +112,7 @@ fi * Tue Nov 10 2015 Fedora Release Engineering - 0.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 -* Thu Oct 21 2015 Will Woods 0.7.0-1 +* Wed Oct 21 2015 Will Woods 0.7.0-1 - Add `log` subcommand (to show upgrade logs) - Fix upgrades on systems without `plymouth` installed - Fix upgrades using `--best` or `--allowerasing` (#1266589)