From 34ecd4e5b625787e49d9c08920de22e4c005f768 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 29 Jul 2015 14:53:26 -0400 Subject: [PATCH] use python2.6 safe unittest2 --- awx/main/tests/commands/commands_monolithic.py | 5 +---- awx/main/tests/commands/run_fact_cache_receiver.py | 2 +- awx/main/tests/fact/fact_api.py | 2 +- awx/main/tests/tasks.py | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/awx/main/tests/commands/commands_monolithic.py b/awx/main/tests/commands/commands_monolithic.py index 233af5dcad..7e591d65d2 100644 --- a/awx/main/tests/commands/commands_monolithic.py +++ b/awx/main/tests/commands/commands_monolithic.py @@ -11,7 +11,7 @@ import sys import tempfile import time import urlparse -import unittest +import unittest2 as unittest # Django import django @@ -26,9 +26,6 @@ from django.test.utils import override_settings from awx.main.models import * # noqa from awx.main.tests.base import BaseTest, BaseLiveServerTest -if not hasattr(unittest, 'skipIf'): - import unittest2 as unittest - __all__ = ['CreateDefaultOrgTest', 'DumpDataTest', 'CleanupDeletedTest', 'CleanupJobsTest', 'CleanupActivityStreamTest', 'InventoryImportTest'] diff --git a/awx/main/tests/commands/run_fact_cache_receiver.py b/awx/main/tests/commands/run_fact_cache_receiver.py index 0940c05e4e..b0fe0aa2bb 100644 --- a/awx/main/tests/commands/run_fact_cache_receiver.py +++ b/awx/main/tests/commands/run_fact_cache_receiver.py @@ -5,7 +5,7 @@ import time from datetime import datetime import mock -import unittest +import unittest2 as unittest from copy import deepcopy from mock import MagicMock diff --git a/awx/main/tests/fact/fact_api.py b/awx/main/tests/fact/fact_api.py index 7c54868be2..157cec3757 100644 --- a/awx/main/tests/fact/fact_api.py +++ b/awx/main/tests/fact/fact_api.py @@ -2,7 +2,7 @@ # All Rights Reserved # Python -import unittest +import unittest2 as unittest # Django from django.core.urlresolvers import reverse diff --git a/awx/main/tests/tasks.py b/awx/main/tests/tasks.py index a14b6d02a7..7a3730f774 100644 --- a/awx/main/tests/tasks.py +++ b/awx/main/tests/tasks.py @@ -8,7 +8,7 @@ import os import shutil import subprocess import tempfile -import unittest +import unittest2 as unittest # Django from django.conf import settings