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

View File

@@ -18,6 +18,7 @@ import mongoengine
# awx
from awx.fact.models.fact import * # noqa
from awx.main.models import * # noqa
from awx.main.utils import timedelta_total_seconds
TEST_FACT_ANSIBLE = {
"ansible_swapfree_mb" : 4092,
@@ -198,12 +199,6 @@ EXPERIMENT_DEFAULT = {
]
}
# damn you python 2.6
def timedelta_total_seconds(timedelta):
return (
timedelta.microseconds + 0.0 +
(timedelta.seconds + timedelta.days * 24 * 3600) * 10 ** 6) / 10 ** 6
class Experiment(object):
def __init__(self, exp, fact_fixtures, raw_db, mongoengine_db):
self.db = raw_db