mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-05 04:51:47 -05:00
Merge pull request #1766 from chrismeyersfsu/i_like_parallel_tests_and_I_can_not_lie
parallelize test running
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
import os
|
||||
import re # noqa
|
||||
import sys
|
||||
import ldap
|
||||
import djcelery
|
||||
import six
|
||||
from datetime import timedelta
|
||||
@@ -39,6 +38,13 @@ def IS_TESTING(argv=None):
|
||||
return is_testing(argv)
|
||||
|
||||
|
||||
if "pytest" in sys.modules:
|
||||
import mock
|
||||
with mock.patch('__main__.__builtins__.dir', return_value=[]):
|
||||
import ldap
|
||||
else:
|
||||
import ldap
|
||||
|
||||
DEBUG = True
|
||||
SQL_DEBUG = DEBUG
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
###############################################################################
|
||||
import os
|
||||
import urllib
|
||||
import sys
|
||||
|
||||
|
||||
def patch_broken_pipe_error():
|
||||
@@ -66,7 +67,7 @@ DATABASES = {
|
||||
# Use SQLite for unit tests instead of PostgreSQL. If the lines below are
|
||||
# commented out, Django will create the test_awx-dev database in PostgreSQL to
|
||||
# run unit tests.
|
||||
if is_testing(sys.argv):
|
||||
if "pytest" in sys.modules:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
|
||||
Reference in New Issue
Block a user