From f96a1a0b35b37c4da711f060ad6337a70d4aba48 Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Mon, 6 Jan 2014 11:22:46 +0000 Subject: [PATCH] Fix Python 2.6 --- tests/__init__.py | 7 +++++++ tests/testcases.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index e69de29bb..b4d38cccb 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,7 @@ +import sys + +if sys.version_info >= (2,7): + import unittest +else: + import unittest2 as unittest + diff --git a/tests/testcases.py b/tests/testcases.py index c1da53898..4ac61d9d7 100644 --- a/tests/testcases.py +++ b/tests/testcases.py @@ -1,10 +1,10 @@ from docker import Client from fig.service import Service from fig.cli.utils import docker_url -from unittest2 import TestCase +from . import unittest -class DockerClientTestCase(TestCase): +class DockerClientTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.client = Client(docker_url())