Cleanup some unit tests and whitespace.

Remove some unnecessary newlines.
Remove a unittest that was attempting to test behaviour that was removed a while ago, so isn't testing anything.
Updated some unit tests to use mocks instead of a custom fake.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-10-20 13:10:32 -04:00
commit b1f8ed84a3
2 changed files with 21 additions and 41 deletions

View file

@ -300,9 +300,7 @@ class Service(object):
Create a container for this service. If the image doesn't exist, attempt to pull
it.
"""
self.ensure_image_exists(
do_build=do_build,
)
self.ensure_image_exists(do_build=do_build)
container_options = self._get_container_create_options(
override_options,
@ -316,9 +314,7 @@ class Service(object):
return Container.create(self.client, **container_options)
def ensure_image_exists(self,
do_build=True):
def ensure_image_exists(self, do_build=True):
try:
self.image()
return
@ -403,9 +399,7 @@ class Service(object):
(action, containers) = plan
if action == 'create':
container = self.create_container(
do_build=do_build,
)
container = self.create_container(do_build=do_build)
self.start_container(container)
return [container]