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

Commit f7a7614

Browse files
committed
add tests for utils.batchinfo
1 parent 512536c commit f7a7614

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,5 +838,20 @@ def test_agent_speed_draining(self):
838838
self.assertEqual(response, set(['vocms0250.cern.ch']))
839839

840840

841+
class TestBatchInfo(unittest.TestCase):
842+
def test_content(self):
843+
from WmAgentScripts.utils import batchInfo
844+
845+
with patch('WmAgentScripts.utils.mongo_client', mock_mongo_client):
846+
obj = batchInfo()
847+
all = obj.all()
848+
self.assertIn(
849+
'CMSSW_10_4_0_pre1__UPSG_Std_2023D24noPU-1542117255', all)
850+
content = obj.content()
851+
self.assertIn(
852+
'CMSSW_10_4_0_pre1__UPSG_Std_2023D24noPU-1542117255',
853+
content)
854+
855+
841856
if __name__ == '__main__':
842857
unittest.main()

0 commit comments

Comments
 (0)