aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-31Reminders: use singular form for mutually exclusive namespaceGravatar MarkKoz-1/+1
The exception it raises reads better if the singular form of the word is used.
2020-07-31Reminders: show error to users if reminder is in useGravatar MarkKoz-3/+3
Silent failure is confusing to users. Showing an error message clears up why nothing happened with their command.
2020-07-31Send users an error message if command raises LockedResourceErrorGravatar MarkKoz-0/+3
2020-07-31Decorators: optionally raise an exception if resource is lockedGravatar MarkKoz-4/+35
The exception will facilitate user feedback for commands which use the decorator.
2020-07-31Decorators: add some trace loggingGravatar MarkKoz-0/+3
2020-07-31Decorators: wrap mutually_exclusive to use get_arg_valueGravatar MarkKoz-7/+20
Instead of taking a callable, this wrapper just takes a name or position to get the resource ID.
2020-07-31Decorators: remove redundant word in docstringGravatar MarkKoz-1/+1
2020-07-31Decorators: use type aliases from function moduleGravatar MarkKoz-4/+2
2020-07-31Decorators: remove default value for respect_role_hierarchyGravatar MarkKoz-3/+3
Explicit is better than implicit, and this default value wasn't much of a convenience.
2020-07-31Decorators: use new func utils in respect_role_hierarchyGravatar MarkKoz-30/+13
Replace the `_get_arg_value` call with `function.get_arg_value` cause the latter makes use of bound arguments, which are more accurate.
2020-07-31Add a function to get bound argsGravatar MarkKoz-4/+17
2020-07-31Add a function to wrap a decorator to use get_arg_valueGravatar MarkKoz-1/+28
2020-07-31Reminders: make operations mutually exclusiveGravatar MarkKoz-0/+7
This fixes race conditions between editing, deleting, and sending a reminder. If one operation is already happening, the others will be aborted.