Allow options to passed to start_container

This commit is contained in:
Ben Firshman 2013-12-10 21:01:39 +00:00
commit c2e9353760
2 changed files with 9 additions and 2 deletions

View file

@ -60,6 +60,11 @@ class NameTestCase(DockerClientTestCase):
self.assertEqual(len(service.containers), 0)
def test_start_container_passes_through_options(self):
db = self.create_service('db')
db.start_container(environment={'FOO': 'BAR'})
self.assertEqual(db.inspect()[0]['Config']['Env'], ['FOO=BAR'])
def test_start_container_inherits_options_from_constructor(self):
db = self.create_service('db', environment={'FOO': 'BAR'})
db.start_container()
self.assertEqual(db.inspect()[0]['Config']['Env'], ['FOO=BAR'])