def test_download_all_with_force(self, download_patch):
        download_patch.side_effect = ["/home/layer1", "/home/layer2"]

        download_layers = LayerDownloader("/home", ".", Mock())

        acutal_results = download_layers.download_all(["layer1", "layer2"], force=True)

        self.assertEqual(acutal_results, ["/home/layer1", "/home/layer2"])

        download_patch.assert_has_calls([call("layer1", True), call("layer2", True)])
    def test_download_all_with_force(self, download_patch):
        download_patch.side_effect = ['/home/layer1', '/home/layer2']

        download_layers = LayerDownloader("/home", ".")

        acutal_results = download_layers.download_all(['layer1', 'layer2'], force=True)

        self.assertEquals(acutal_results, ['/home/layer1', '/home/layer2'])

        download_patch.assert_has_calls([call('layer1', True), call("layer2", True)])
示例#3
0
    def test_download_all_with_force(self, download_patch):
        download_patch.side_effect = ['/home/layer1', '/home/layer2']

        download_layers = LayerDownloader("/home", ".")

        acutal_results = download_layers.download_all(['layer1', 'layer2'], force=True)

        self.assertEquals(acutal_results, ['/home/layer1', '/home/layer2'])

        download_patch.assert_has_calls([call('layer1', True), call("layer2", True)])