mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-28 02:41:49 -05:00
Merge branch 'vagrant-unstable'
This commit is contained in:
@@ -23,14 +23,14 @@ def paginated(method):
|
||||
# Manually spin up pagination.
|
||||
# How many results do we show?
|
||||
limit = api_settings.PAGINATE_BY
|
||||
if request.GET.get(api_settings.PAGINATE_BY_PARAM, False):
|
||||
limit = request.GET[api_settings.PAGINATE_BY_PARAM]
|
||||
if request.QUERY_PARAMS.get(api_settings.PAGINATE_BY_PARAM, False):
|
||||
limit = request.QUERY_PARAMS[api_settings.PAGINATE_BY_PARAM]
|
||||
if api_settings.MAX_PAGINATE_BY:
|
||||
limit = min(api_settings.MAX_PAGINATE_BY, limit)
|
||||
limit = int(limit)
|
||||
|
||||
# What page are we on?
|
||||
page = int(request.GET.get('page', 1))
|
||||
page = int(request.QUERY_PARAMS.get('page', 1))
|
||||
offset = (page - 1) * limit
|
||||
|
||||
# Add the limit, offset, and page variables to the keyword arguments
|
||||
|
||||
@@ -11,6 +11,7 @@ import sys
|
||||
import tempfile
|
||||
import time
|
||||
import urlparse
|
||||
import unittest
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
@@ -872,6 +873,9 @@ class InventoryImportTest(BaseCommandMixin, BaseLiveServerTest):
|
||||
self.assertEqual(new_inv.total_groups, ngroups)
|
||||
self.assertElapsedLessThan(30)
|
||||
|
||||
@unittest.skipIf(getattr(settings, 'LOCAL_DEVELOPMENT', False),
|
||||
'Skip this test in local development environments, '
|
||||
'which may vary widely on memory.')
|
||||
def test_large_inventory_file(self):
|
||||
new_inv = self.organizations[0].inventories.create(name='largeinv')
|
||||
self.assertEqual(new_inv.hosts.count(), 0)
|
||||
|
||||
@@ -47,6 +47,9 @@ if 'django_jenkins' in INSTALLED_APPS:
|
||||
JSHINT_CHECKED_FILES = [os.path.join(BASE_DIR, 'ui/static/js'),
|
||||
os.path.join(BASE_DIR, 'ui/static/lib/ansible'),]
|
||||
|
||||
# If there is an `/etc/awx/settings.py`, include it.
|
||||
include(optional('/etc/awx/settings.py'), scope=locals())
|
||||
|
||||
# If any local_*.py files are present in awx/settings/, use them to override
|
||||
# default settings for development. If not present, we can still run using
|
||||
# only the defaults.
|
||||
|
||||
Reference in New Issue
Block a user