| 1 |
From: s3v <[email protected]> |
| 2 |
Date: Thu, 12 Dec 2024 23:15:11 +0000 |
| 3 |
Subject: Switch to unittest.mock |
| 4 |
|
| 5 |
Origin: other, https://bugs.debian.org/1088224#15 |
| 6 |
Bug-Debian: https://bugs.debian.org/1088224 |
| 7 |
Last-Update: 2024-12-12 |
| 8 |
--- |
| 9 |
cloud_sptheme/tests/test_ext_relbar_toc.py | 6 +++--- |
| 10 |
1 file changed, 3 insertions(+), 3 deletions(-) |
| 11 |
|
| 12 |
diff --git a/cloud_sptheme/tests/test_ext_relbar_toc.py b/cloud_sptheme/tests/test_ext_relbar_toc.py |
| 13 |
index 8b9357a..529d9fa 100644 |
| 14 |
--- a/cloud_sptheme/tests/test_ext_relbar_toc.py |
| 15 |
+++ b/cloud_sptheme/tests/test_ext_relbar_toc.py |
| 16 |
@@ -10,7 +10,7 @@ import logging |
| 17 |
log = logging.getLogger(__name__) |
| 18 |
import os |
| 19 |
# site |
| 20 |
|
| 21 |
+from unittest import mock |
| 22 |
# pkg |
| 23 |
from .utils import TestCase, unittest |
| 24 |
# subject |
| 25 |
@@ -46,8 +46,8 @@ class UtilsTestCase(TestCase): |
| 26 |
|
| 27 |
# patch sphinx's _() to be noop |
| 28 |
patch = mock.patch.object(relbar_links, "_", side_effect=lambda s: s) |
| 29 |
|
| 30 |
|
| 31 |
+ patch.start() |
| 32 |
+ self.addCleanup(patch.stop) |
| 33 |
|
| 34 |
def test_insert_no_links(self): |
| 35 |
""" |