mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user