Changeset - 91103995888b
[Not reviewed]
default
0 2 0
Mads Kiilerich (mads) - 6 years ago 2019-12-26 05:36:00
mads@kiilerich.com
Grafted from: 02fb169bb595
tests: fix ordering of options of "ret_type must be one of ..." returned from api

Py3 would fail becauase it use another ordering.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/api/api.py
Show inline comments
 
@@ -1160,7 +1160,7 @@ class ApiController(JSONRPCController):
 
            return _map[ret_type]
 
        except KeyError:
 
            raise JSONRPCError('ret_type must be one of %s'
 
                               % (','.join(_map.keys())))
 
                               % (','.join(sorted(_map))))
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
kallithea/tests/api/api_base.py
Show inline comments
 
@@ -807,7 +807,7 @@ class _BaseTestApi(object):
 
        response = api_call(self, params)
 

	
 
        expected = ('ret_type must be one of %s'
 
                    % (','.join(['files', 'dirs', 'all'])))
 
                    % (','.join(sorted(['files', 'dirs', 'all']))))
 
        self._compare_error(id_, expected, given=response.body)
 

	
 
    @parametrize('name,ret_type,grant_perm', [
0 comments (0 inline, 0 general)