summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2015-04-24 15:56:35 -0700
committerJoffrey F <joffrey@docker.com>2015-04-24 15:56:35 -0700
commitc2d48652ce9e5808bfa3f22b2daec34e88d5e9df (patch)
tree3ca3248004c72a5bccae17c479e099e821baea7d /tests
parent185fceda7b32b28aed27eae86a3a4bc2a457ba44 (diff)
downloaddocker-py-c2d48652ce9e5808bfa3f22b2daec34e88d5e9df.tar.gz
Added check_resource decorator to interrupt command if container or image argument is None
Diffstat (limited to 'tests')
-rw-r--r--tests/test.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test.py b/tests/test.py
index f2af58b..76c5638 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -669,6 +669,21 @@ class DockerClientTest(Cleanup, base.BaseTestCase):
args[1]['timeout'], docker.client.DEFAULT_TIMEOUT_SECONDS
)
+ def test_start_container_none(self):
+ try:
+ self.client.start(container=None)
+ except ValueError as e:
+ self.assertEqual(str(e), 'image or container param is None')
+ else:
+ self.fail('Command should raise ValueError')
+
+ try:
+ self.client.start(None)
+ except ValueError as e:
+ self.assertEqual(str(e), 'image or container param is None')
+ else:
+ self.fail('Command should raise ValueError')
+
def test_create_container_with_lxc_conf(self):
try:
self.client.create_container(