mirror of https://github.com/docker/docker-py.git
Add test to check for the absence of volumes_from
This commit is contained in:
parent
3198dd9fde
commit
16ad8198a9
|
|
@ -341,6 +341,15 @@ class DockerClientTest(unittest.TestCase):
|
||||||
','.join(vol_names))
|
','.join(vol_names))
|
||||||
self.assertEqual(args[1]['headers'],
|
self.assertEqual(args[1]['headers'],
|
||||||
{'Content-Type': 'application/json'})
|
{'Content-Type': 'application/json'})
|
||||||
|
def test_create_container_empty_volumes_from(self):
|
||||||
|
try:
|
||||||
|
self.client.create_container('busybox', 'true', volumes_from=[])
|
||||||
|
except Exception as e:
|
||||||
|
self.fail('Command should not raise exception: {0}'.format(e))
|
||||||
|
|
||||||
|
args = fake_request.call_args
|
||||||
|
data = json.loads(args[1]['data'])
|
||||||
|
self.assertTrue('VolumesFrom' not in data)
|
||||||
|
|
||||||
def test_create_named_container(self):
|
def test_create_named_container(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue