Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit de4d994

Browse files
committed
add tests for utils.agent_speed_draining
1 parent 377f2a1 commit de4d994

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,5 +818,14 @@ def getresponse(self):
818818
response, [[{'name': 'someSite'}, {'name': 'someSite1'}]])
819819

820820

821+
class TestAgentSpeedDraining(unittest.TestCase):
822+
def test_agent_speed_draining(self):
823+
from WmAgentScripts.utils import agent_speed_draining
824+
825+
with patch('WmAgentScripts.utils.mongo_client', mock_mongo_client):
826+
response=agent_speed_draining()
827+
self.assertEqual(response, set([u'vocms0250.cern.ch']))
828+
829+
821830
if __name__ == '__main__':
822831
unittest.main()

0 commit comments

Comments
 (0)