Blob Blame History Raw
From 02be99b227b05248125fccb5551bed75c9447917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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