def tearDown(self): """ Clean up host containers after every test. """ if do_teardown(): containers = docker.ps("-qa").split() for container in containers: delete_container(container)
def setUp(self): """ Clean up host containers before every test. """ containers = docker.ps("-qa").split() for container in containers: delete_container(container) self.ip = get_ip() self.start_etcd()
def delete(self): """ Have a container delete itself. """ delete_container(self.name)