Merge pull request #345 from chrismeyersfsu/fix-centos_6.5

unittest works on centos 6.5
This commit is contained in:
Matthew Jones
2015-08-05 19:43:57 -04:00
8 changed files with 27 additions and 16 deletions
+6 -2
View File
@@ -56,8 +56,12 @@ class QueueTestMixin(object):
def start_redis(self):
if not getattr(self, 'redis_process', None):
self.redis_process = Popen('redis-server --port 16379 > /dev/null',
shell=True, executable='/bin/bash')
# Centos 6.5 redis is runnable by non-root user but is not in a normal users path by default
env = dict(os.environ)
env['PATH'] = '%s:/usr/sbin/' % env['PATH']
self.redis_process = Popen('echo "port 16379" | redis-server - > /dev/null',
shell=True, executable='/bin/bash',
env=env)
def stop_redis(self):
if getattr(self, 'redis_process', None):
@@ -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']
@@ -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
+1 -1
View File
@@ -2,7 +2,7 @@
# All Rights Reserved
# Python
import unittest
import unittest2 as unittest
# Django
from django.core.urlresolvers import reverse
+1 -1
View File
@@ -8,7 +8,7 @@ import os
import shutil
import subprocess
import tempfile
import unittest
import unittest2 as unittest
# Django
from django.conf import settings