diff options
author | Joffrey F <joffrey@docker.com> | 2014-11-26 23:14:19 +0100 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2014-11-26 23:14:19 +0100 |
commit | a9bc84cece547d101069afd195d1500f67e3a44a (patch) | |
tree | 138523304d30a029705dcf01ef58cb0362b88c4e /tests/test.py | |
parent | 0012430b1bda8a7e16c58366624a733ba63712a8 (diff) | |
download | docker-py-393-enforce-str-version.tar.gz |
Enforce passing string as version param in ctor393-enforce-str-version
Diffstat (limited to 'tests/test.py')
-rw-r--r-- | tests/test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test.py b/tests/test.py index c9a1b05..38cbc2f 100644 --- a/tests/test.py +++ b/tests/test.py @@ -102,6 +102,17 @@ class DockerClientTest(Cleanup, unittest.TestCase): def tearDown(self): self.client.close() + def test_ctor(self): + try: + docker.Client(version=1.12) + except Exception as e: + self.assertTrue(isinstance(e, docker.errors.DockerException)) + if not six.PY3: + self.assertEqual( + e.message, + 'version parameter must be a string. Found float' + ) + ######################### # INFORMATION TESTS # ######################### |