Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
Make sure cliquet.batch_max_requests is exposed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Oct 13, 2015
1 parent 48c7176 commit 8ee8c1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions syncto/__init__.py
Expand Up @@ -31,6 +31,9 @@ def main(global_config, **settings):
cliquet.initialize(config, __version__, 'syncto',
default_settings=DEFAULT_SETTINGS)

# Retro-compatibility with first Kinto clients.
config.registry.public_settings.add('cliquet.batch_max_requests')

settings = config.get_settings()

if settings['cache_hmac_secret'] is None:
Expand Down
7 changes: 7 additions & 0 deletions syncto/tests/test_functional.py
Expand Up @@ -35,6 +35,13 @@ def test_syncto_cache_hmac_secret_missing(self):

class ErrorsTest(FormattedErrorMixin, BaseWebTest, unittest.TestCase):

def test_public_settings_are_shown_in_view_prefixed_with_cliquet(self):
response = self.app.get('/')
settings = response.json['settings']
expected = {'batch_max_requests': 25,
'cliquet.batch_max_requests': 25}
self.assertEqual(expected, settings)

def test_authorization_header_is_required_for_collection(self):
resp = self.app.get(COLLECTION_URL, headers=self.headers, status=401)

Expand Down

0 comments on commit 8ee8c1b

Please sign in to comment.