summaryrefslogtreecommitdiffstats
path: root/windriver
diff options
context:
space:
mode:
Diffstat (limited to 'windriver')
-rw-r--r--windriver/titanium_cloud/vesagent/tests_tasks.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/windriver/titanium_cloud/vesagent/tests_tasks.py b/windriver/titanium_cloud/vesagent/tests_tasks.py
index ae3c9718..e749dd8d 100644
--- a/windriver/titanium_cloud/vesagent/tests_tasks.py
+++ b/windriver/titanium_cloud/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