diff --git a/syncto/__init__.py b/syncto/__init__.py index 037264b..b4e4de4 100644 --- a/syncto/__init__.py +++ b/syncto/__init__.py @@ -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: diff --git a/syncto/tests/test_functional.py b/syncto/tests/test_functional.py index c2a92f9..7c7a2ac 100644 --- a/syncto/tests/test_functional.py +++ b/syncto/tests/test_functional.py @@ -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)