summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ocata/ocata/vesagent/tests_tasks.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ocata/ocata/vesagent/tests_tasks.py b/ocata/ocata/vesagent/tests_tasks.py
index a139c51b..e1e3c5c8 100644
--- a/ocata/ocata/vesagent/tests_tasks.py
+++ b/ocata/ocata/vesagent/tests_tasks.py
@@ -67,4 +67,16 @@ class VesTaskTest(unittest.TestCase):
self.assertEquals(None, result)
pass
+ @mock.patch.object(tasks, 'processBacklogsOfOneVIM')
+ @mock.patch.object(cache, 'get')
+ def test_tasks_processBacklogs(self, mock_cache_get, mock_tasks_processBacklogsOfOneVIM):
+ mock_VesAgentBacklogs_vimlist = ["windriver-hudson-dc_RegionOne"]
+ COUNT_TIME_SLOT_ONE_VIM = (1, 1)
+ mock_tasks_processBacklogsOfOneVIM.return_value = COUNT_TIME_SLOT_ONE_VIM
+ mock_cache_get.side_effect= [
+ json.dumps(mock_VesAgentBacklogs_vimlist),
+ ]
+ result = tasks.processBacklogs()
+ self.assertEquals(COUNT_TIME_SLOT_ONE_VIM, result)
+ pass