custom timeout test rewrite

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2015-09-02 18:00:08 -07:00
parent f9c7346380
commit 6a95f6d628
1 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ class DockerClientTestCase(unittest.TestCase):
docker_client.docker_client()
def test_docker_client_with_custom_timeout(self):
with mock.patch.dict(os.environ):
os.environ['DOCKER_CLIENT_TIMEOUT'] = timeout = "300"
timeout = 300
with mock.patch('compose.cli.docker_client.HTTP_TIMEOUT', 300):
client = docker_client.docker_client()
self.assertEqual(client.timeout, int(timeout))
self.assertEqual(client.timeout, int(timeout))