mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 08:57:35 -02:30
Use separate module for pytest settings (#13895)
* Use separate module for test settings * Further refine some pre-existing comments in settings * Add CACHES to setting snapshot exceptions to accommodate changed load order
This commit is contained in:
@@ -2190,7 +2190,7 @@ class BulkHostCreateSerializer(serializers.Serializer):
|
||||
host_data = []
|
||||
for r in result:
|
||||
item = {k: getattr(r, k) for k in return_keys}
|
||||
if not settings.IS_TESTING_MODE:
|
||||
if settings.DATABASES and ('sqlite3' not in settings.DATABASES.get('default', {}).get('ENGINE')):
|
||||
# sqlite acts different with bulk_create -- it doesn't return the id of the objects
|
||||
# to get it, you have to do an additional query, which is not useful for our tests
|
||||
item['url'] = reverse('api:host_detail', kwargs={'pk': r.id})
|
||||
|
||||
Reference in New Issue
Block a user