Пример #1
0
    def test_parse_volumes(self):
        """Parsing volumes parameter
        """
        volumes, binds = utils.parse_volumes(["/home/local:/home/container"])
        self.assertEquals({"/home/container":{}}, volumes)
        self.assertEquals(["/home/local:/home/container"], binds)

        volumes, binds = utils.parse_volumes(
            ["/home/local:/home/container", "/container"])
        self.assertEquals(
            {"/home/container", "/container"}, set(volumes.keys()))
        self.assertEquals(["/home/local:/home/container"], binds)
Пример #2
0
    def test_parse_volumes(self):
        """Parsing volumes parameter
        """
        volumes, binds = utils.parse_volumes(["/home/local:/home/container"])
        self.assertEquals({"/home/container": {}}, volumes)
        self.assertEquals(["/home/local:/home/container"], binds)

        volumes, binds = utils.parse_volumes(
            ["/home/local:/home/container", "/container"])
        self.assertEquals({"/home/container", "/container"},
                          set(volumes.keys()))
        self.assertEquals(["/home/local:/home/container"], binds)
Пример #3
0
    def test_parse_volumes_invalid_params(self):
        self.assertEquals(
            ({}, []), utils.parse_volumes(None))

        self.assertEquals(
            ({}, []), utils.parse_volumes(""))
Пример #4
0
    def test_parse_volumes_invalid_params(self):
        self.assertEquals(({}, []), utils.parse_volumes(None))

        self.assertEquals(({}, []), utils.parse_volumes(""))