Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_045_raises_no_ctnrs(self):
global ident, pod
with self.assertRaises(podman.NoContainersInPod):
pod.start()
with self.assertRaises(podman.NoContainersInPod):
pod.restart()
with self.assertRaises(podman.NoContainerRunning):
next(pod.stats())
with self.assertRaises(podman.ErrorOccurred):
pod.top()
def test_045_raises_no_ctnrs(self):
global ident, pod
with self.assertRaises(podman.NoContainersInPod):
pod.start()
with self.assertRaises(podman.NoContainersInPod):
pod.restart()
with self.assertRaises(podman.NoContainerRunning):
next(pod.stats())
with self.assertRaises(podman.ErrorOccurred):
pod.top()