From a7f7fbb0fdd1ad247c413170c354d08deb43dd32 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 10 Feb 2015 12:43:56 -0800 Subject: rename() tests and docs --- tests/integration_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/integration_test.py') diff --git a/tests/integration_test.py b/tests/integration_test.py index 32f32a0..46b630e 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -322,6 +322,18 @@ class TestCreateContainerWithName(BaseTestCase): self.assertEqual('/foobar', inspect['Name']) +class TestRenameContainer(BaseTestCase): + def runTest(self): + name = 'hong_meiling' + res = self.client.create_container('busybox', 'true') + self.assertIn('Id', res) + self.tmp_containers.append(res['Id']) + self.client.rename(res, name) + inspect = self.client.inspect_container(res['Id']) + self.assertIn('Name', inspect) + self.assertEqual(name, inspect['Name']) + + class TestStartContainer(BaseTestCase): def runTest(self): res = self.client.create_container('busybox', 'true') -- cgit v1.2.1