X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Fcommon%2Fconfig.py;h=f73c0abf285a1d0db214718c54533f19b74a1ed2;hb=d96bf32a81e1c109c87013db5799940c0f9d726b;hp=70d7bd63fe3b2fa7fd814b220abe6d304490c929;hpb=be3512443d1e386fb7d65b8a932a54190bd08da5;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/common/config.py b/utils/test/testapi/opnfv_testapi/common/config.py index 70d7bd63f..f73c0abf2 100644 --- a/utils/test/testapi/opnfv_testapi/common/config.py +++ b/utils/test/testapi/opnfv_testapi/common/config.py @@ -17,6 +17,11 @@ 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, + 'static') def _parse(self): if not os.path.exists(self.file): @@ -33,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: