diff options
author | 2017-06-22 02:19:20 +0000 | |
---|---|---|
committer | 2017-06-22 02:19:20 +0000 | |
commit | b7644e8f1f43b762bab51d8bc7a68298558a6bdf (patch) | |
tree | 4cd24ba34647c32cef89e2a0391be3818ed7af0a /utils/test/testapi/opnfv_testapi/common | |
parent | e9383ded0d640e372d29c3d191ef68868ea0aa02 (diff) | |
parent | d96bf32a81e1c109c87013db5799940c0f9d726b (diff) |
Merge "support pagination in TestAPI"
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/common')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/common/config.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/test/testapi/opnfv_testapi/common/config.py b/utils/test/testapi/opnfv_testapi/common/config.py index 46765ffd1..f73c0abf2 100644 --- a/utils/test/testapi/opnfv_testapi/common/config.py +++ b/utils/test/testapi/opnfv_testapi/common/config.py @@ -17,6 +17,7 @@ class Config(object): def __init__(self): self.file = self.CONFIG if self.CONFIG else self._default_config() self._parse() + self._parse_per_page() self.static_path = os.path.join( os.path.dirname(os.path.normpath(__file__)), os.pardir, @@ -37,6 +38,10 @@ class Config(object): [setattr(self, '{}_{}'.format(section, k), self._parse_value(v)) for k, v in config.items(section)] + def _parse_per_page(self): + if not hasattr(self, 'api_results_per_page'): + self.api_results_per_page = 20 + @staticmethod def _parse_value(value): try: |