def test_is_running(self): with self.subTest("Check exited container"): self.assertFalse(ContainerManager.is_running(self.node, "c1")) with self.subTest("Check running container"): self.container._status = "running" self.assertTrue(ContainerManager.is_running(self.node, "c1")) with self.subTest("Try to get status of non-existent container"): self.assertRaises(NotFound, ContainerManager.is_running, self.node, "c2")
def is_running(self): return ContainerManager.is_running(self, "node")