def test_url_manifest(self):
     url = 'http://test.com/manifest.mf'
     args = b.parse_args([url, '-o', '/tmp'])
     b.download_manifest = MagicMock(return_value=True)
     b.main(args)
     b.download_manifest.assert_called_with(url, '/tmp')
 def test_url_target_directory(self):
     url = 'http://test.com/fittings.yaml'
     args = b.parse_args([url, '-o', '/tmp'])
     b.download_file = MagicMock(return_value=True)
     b.main(args)
     b.download_file.assert_called_with(url, '/tmp')
 def test_url_cwd(self):
     url = 'http://test.com/fittings.yaml'
     args = b.parse_args([url])
     b.download_file = MagicMock(return_value=True)
     b.main(args)
     b.download_file.assert_called_with(url, os.getcwd())
Exemplo n.º 4
0
 def test_url_manifest(self):
     url = 'http://test.com/manifest.mf'
     args = b.parse_args([url, '-o', '/tmp'])
     b.download_manifest = MagicMock(return_value=True)
     b.main(args)
     b.download_manifest.assert_called_with(url, '/tmp')
Exemplo n.º 5
0
 def test_url_target_directory(self):
     url = 'http://test.com/fittings.yaml'
     args = b.parse_args([url, '-o', '/tmp'])
     b.download_file = MagicMock(return_value=True)
     b.main(args)
     b.download_file.assert_called_with(url, '/tmp')
Exemplo n.º 6
0
 def test_url_cwd(self):
     url = 'http://test.com/fittings.yaml'
     args = b.parse_args([url])
     b.download_file = MagicMock(return_value=True)
     b.main(args)
     b.download_file.assert_called_with(url, os.getcwd())