Delete all containers on the Docker daemon before running test

This commit is contained in:
Aanand Prasad 2013-12-09 11:46:53 +00:00
parent f80ccab9d6
commit 83a086b865
1 changed files with 2 additions and 1 deletions

View File

@ -8,8 +8,9 @@ class ServiceTestCase(TestCase):
self.client = Client('http://127.0.0.1:4243')
self.client.pull('ubuntu')
for c in self.client.containers():
for c in self.client.containers(all=True):
self.client.kill(c['Id'])
self.client.remove_container(c['Id'])
self.service = Service(
client=self.client,