added pytest to requirements_dev

reworking test strucutre

reworked pytest.ini, removed functional imports, updated req_dev

remove unneeded __init__ files

add testing checker to local_settings examples

adding testing packages to system Python for docker
This commit is contained in:
Wayne Witzel III
2016-01-27 13:42:58 -05:00
parent 5d6ea242c0
commit 3d4580611e
14 changed files with 35 additions and 181 deletions

View File

@@ -30,10 +30,17 @@ DATABASES = {
}
}
def is_testing(argv):
if "py.test" in argv[0] or "py/test.py" in argv[0]:
return True
elif argv[1] == "test":
return True
return False
# 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 len(sys.argv) >= 2 and sys.argv[1] == 'test':
if len(sys.argv) >= 2 and is_testing(sys.argv):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',