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)
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)
def test_parse_volumes_invalid_params(self): self.assertEquals( ({}, []), utils.parse_volumes(None)) self.assertEquals( ({}, []), utils.parse_volumes(""))
def test_parse_volumes_invalid_params(self): self.assertEquals(({}, []), utils.parse_volumes(None)) self.assertEquals(({}, []), utils.parse_volumes(""))