annotate tox.ini @ 5328:b580691553f5

auth: turn dead AuthUser code into assertion The result of db.User.get_dict never contains the keys 'api_keys' or 'permissions'. The keys returned by get_dict are 1) all the User table columns, 2) the keys explicitly defined in User.__json__, and 3) the keys defined in User.get_api_data, none of which include the two blacklisted keys. 'api_keys' would be returned if __json__ called get_api_data with argument details=True; but currently that is not the case. In case there's a reason why these two keys must never appear in an AuthUser object, the check has not been removed entirely; instead, it's been turned into an assertion. This way, it will be noticed if __json__ is later modified to request detailed API data, for instance.
author Søren Løvborg <kwi@kwi.dk>
date Sun, 26 Jul 2015 14:10:44 +0200
parents 8c1258f69892
children 768989c595aa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5015
2481c0a1ed31 Add tox.ini
Marc Abramowitz <marc@marc-abramowitz.com>
parents:
diff changeset
1 [tox]
5016
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
2 envlist = py{26,27}-{pytest,nose}
5015
2481c0a1ed31 Add tox.ini
Marc Abramowitz <marc@marc-abramowitz.com>
parents:
diff changeset
3
2481c0a1ed31 Add tox.ini
Marc Abramowitz <marc@marc-abramowitz.com>
parents:
diff changeset
4 [testenv]
5017
9c5e6984bd0e tox.ini: Set PYTHONHASHSEED = 0
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5016
diff changeset
5 setenv =
9c5e6984bd0e tox.ini: Set PYTHONHASHSEED = 0
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5016
diff changeset
6 PYTHONHASHSEED = 0
5016
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
7 deps =
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
8 nose: nose
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
9 pytest: pytest
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
10 commands =
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
11 nose: nosetests {posargs}
46662961d58d tox.ini: Add nose and pytest deps
Marc Abramowitz <marc@marc-abramowitz.com>
parents: 5015
diff changeset
12 pytest: py.test {posargs}