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

Commit e4a0ce8

Browse files
committed
add unittests for utils.getConfigurationLine
1 parent 98232d6 commit e4a0ce8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_utils.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,18 @@ def test_getConfigurationFile(self):
624624
self.assertEqual(
625625
response, "Test1 line 1\nTest2 line 2\nTest3 line 3")
626626

627+
def test_getConfigurationLine(self):
628+
from WmAgentScripts.utils import getConfigurationLine
629+
630+
with patch('WmAgentScripts.utils.make_x509_conn', self.mockresponse):
631+
632+
response = getConfigurationLine(
633+
url='http://someurl.com/',
634+
cacheid='cacheid',
635+
token='Test2')
636+
637+
self.assertEqual(response, "Test2 line 2")
638+
627639

628640
if __name__ == '__main__':
629641
unittest.main()

0 commit comments

Comments
 (0)