mirror of
https://github.com/ansible/awx.git
synced 2026-04-01 00:05:07 -02:30
Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling.
This commit is contained in:
@@ -30,23 +30,18 @@ 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 is_testing(sys.argv):
|
||||
if is_testing(sys.argv):
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'awx.sqlite3'),
|
||||
# Test database cannot be :memory: for celery/inventory tests.
|
||||
'TEST_NAME': os.path.join(BASE_DIR, 'awx_test.sqlite3'),
|
||||
'TEST': {
|
||||
# Test database cannot be :memory: for celery/inventory tests.
|
||||
'NAME': os.path.join(BASE_DIR, 'awx_test.sqlite3'),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user