Extract docker URL logic, use it in tests as well

This commit is contained in:
Aanand Prasad 2013-12-31 12:37:17 +00:00
commit 9ed6538693
4 changed files with 32 additions and 32 deletions

View file

@ -1,16 +1,13 @@
from docker import Client
from fig.service import Service
import os
from fig.cli.utils import docker_url
from unittest import TestCase
class DockerClientTestCase(TestCase):
@classmethod
def setUpClass(cls):
if os.environ.get('DOCKER_URL'):
cls.client = Client(os.environ['DOCKER_URL'])
else:
cls.client = Client()
cls.client = Client(docker_url())
cls.client.pull('ubuntu')
def setUp(self):