mirror of https://github.com/docker/docker-py.git
Use assertRaises in a backward compatible fashion
This commit is contained in:
parent
6e0b5a8d70
commit
2f6579bf59
|
@ -2285,8 +2285,10 @@ class DockerClientTest(Cleanup, unittest.TestCase):
|
|||
self.assertIn('SecurityOpt', result)
|
||||
self.assertEqual(result['SecurityOpt'], security_opt)
|
||||
|
||||
with self.assertRaises(docker.errors.DockerException):
|
||||
create_host_config(security_opt='wrong')
|
||||
self.assertRaises(
|
||||
docker.errors.DockerException, create_host_config,
|
||||
security_opt='wrong'
|
||||
)
|
||||
|
||||
|
||||
class StreamTest(Cleanup, unittest.TestCase):
|
||||
|
|
Loading…
Reference in New Issue