示例#1
0
 def test_stream_file_windows(self):
     with mock.patch('kb_python.dry.utils.print') as p,\
         mock.patch('kb_python.dry.utils.PLATFORM', 'windows'):
         with self.assertRaises(UnsupportedOSException):
             utils.stream_file('url', 'path')
         p.assert_not_called()
示例#2
0
 def test_stream_file(self):
     with mock.patch('kb_python.dry.utils.print') as p,\
         mock.patch('kb_python.dry.utils.PLATFORM', 'darwin'):
         self.assertIsNone(utils.stream_file('url', 'path'))
         p.assert_called()