def test_layer_is_not_cached(self):
        download_layers = LayerDownloader("/", ".", Mock())

        layer_path = Mock()
        layer_path.exists.return_value = False

        self.assertFalse(download_layers._is_layer_cached(layer_path))
    def test_layer_is_not_cached(self):
        download_layers = LayerDownloader("/", ".")

        layer_path = Mock()
        layer_path.exists.return_value = False

        self.assertFalse(download_layers._is_layer_cached(layer_path))
Example #3
0
    def test_layer_is_cached(self):
        download_layers = LayerDownloader("/", ".")

        layer_path = Mock()
        layer_path.exists.return_value = True

        self.assertTrue(download_layers._is_layer_cached(layer_path))