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()
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()