2021-01-08 13:41:50 +01:00
|
|
|
From 5a83801b7733f09c35a7ff0abb5aa32d4c857e4b Mon Sep 17 00:00:00 2001
|
2019-12-10 16:22:43 +01:00
|
|
|
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
|
2021-01-08 13:41:50 +01:00
|
|
|
index c18b42be57..b04965268a 100644
|
2019-12-10 16:22:43 +01:00
|
|
|
--- a/tests/unit/cli/test_batch_async.py
|
|
|
|
+++ b/tests/unit/cli/test_batch_async.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -134,7 +134,13 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase):
|
|
|
|
"salt/batch/1235/done",
|
|
|
|
),
|
2019-12-10 16:22:43 +01:00
|
|
|
)
|
2021-01-08 13:41:50 +01:00
|
|
|
- self.assertEqual(len(self.batch.event.remove_event_handler.mock_calls), 1)
|
2019-12-10 16:22:43 +01:00
|
|
|
+
|
|
|
|
+ def test_batch__del__(self):
|
|
|
|
+ batch = BatchAsync(MagicMock(), MagicMock(), MagicMock())
|
|
|
|
+ event = MagicMock()
|
|
|
|
+ batch.event = event
|
|
|
|
+ batch.__del__()
|
2021-01-08 13:41:50 +01:00
|
|
|
+ self.assertEqual(len(event.remove_event_handler.mock_calls), 1)
|
2019-12-10 16:22:43 +01:00
|
|
|
|
|
|
|
@tornado.testing.gen_test
|
|
|
|
def test_batch_next(self):
|
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2019-12-10 16:22:43 +01:00
|
|
|
|
|
|
|
|