Make sure the build path we pass to docker-py is a binary string

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2015-04-30 11:57:46 +01:00
commit 4f366d8355
3 changed files with 32 additions and 2 deletions

View file

@ -22,7 +22,8 @@ class DockerClientTestCase(unittest.TestCase):
self.client.remove_image(i)
def create_service(self, name, **kwargs):
kwargs['image'] = kwargs.pop('image', 'busybox:latest')
if 'image' not in kwargs and 'build' not in kwargs:
kwargs['image'] = 'busybox:latest'
if 'command' not in kwargs:
kwargs['command'] = ["/bin/sleep", "300"]