34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
|
From 78b466b0d45de8b7edace542dd3815ca852def40 Mon Sep 17 00:00:00 2001
|
||
|
From: Mihai Dinca <mdinca@suse.de>
|
||
|
Date: Tue, 3 Dec 2019 11:22:42 +0100
|
||
|
Subject: [PATCH] Fix batch_async obsolete test
|
||
|
|
||
|
---
|
||
|
tests/unit/cli/test_batch_async.py | 8 +++++++-
|
||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/tests/unit/cli/test_batch_async.py b/tests/unit/cli/test_batch_async.py
|
||
|
index 12dfe543bc..f1d36a81fb 100644
|
||
|
--- a/tests/unit/cli/test_batch_async.py
|
||
|
+++ b/tests/unit/cli/test_batch_async.py
|
||
|
@@ -140,8 +140,14 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase):
|
||
|
"salt/batch/1235/done"
|
||
|
)
|
||
|
)
|
||
|
+
|
||
|
+ def test_batch__del__(self):
|
||
|
+ batch = BatchAsync(MagicMock(), MagicMock(), MagicMock())
|
||
|
+ event = MagicMock()
|
||
|
+ batch.event = event
|
||
|
+ batch.__del__()
|
||
|
self.assertEqual(
|
||
|
- len(self.batch.event.remove_event_handler.mock_calls), 1)
|
||
|
+ len(event.remove_event_handler.mock_calls), 1)
|
||
|
|
||
|
@tornado.testing.gen_test
|
||
|
def test_batch_next(self):
|
||
|
--
|
||
|
2.23.0
|
||
|
|
||
|
|