diff options
author | Joffrey F <joffrey@docker.com> | 2015-02-10 12:43:56 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2015-02-10 12:55:44 -0800 |
commit | a7f7fbb0fdd1ad247c413170c354d08deb43dd32 (patch) | |
tree | b2fae940cc7a74caa1c8345f991cd6314e7f4a50 /tests/test.py | |
parent | 35c4cbd9c49d70922802aa19cb57c302c9bc9d8b (diff) | |
download | docker-py-rename_container.tar.gz |
rename() tests and docsrename_container
Diffstat (limited to 'tests/test.py')
-rw-r--r-- | tests/test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test.py b/tests/test.py index 7ada2a9..5c8f6ea 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1256,6 +1256,21 @@ class DockerClientTest(Cleanup, unittest.TestCase): timeout=docker.client.DEFAULT_TIMEOUT_SECONDS ) + def test_rename_container(self): + try: + self.client.rename( + {'Id': fake_api.FAKE_CONTAINER_ID}, + name='foobar' + ) + except Exception as e: + self.fail('Command shold not raise exception: {0}'.format(e)) + + fake_request.assert_called_with( + url_prefix + 'containers/3cc2351ab11b/rename', + params={'name': 'foobar'}, + timeout=docker.client.DEFAULT_TIMEOUT_SECONDS + ) + def test_wait(self): try: self.client.wait(fake_api.FAKE_CONTAINER_ID) |