Expanded database testing

- Tested Submission.count descriptor
- Tested Submission.clear_other_votes
- Expanded Submission.advance testing to include exceptions, Submission
.active, Submission.completed and Submission.voting
- Changed db model __repr__ implementations to use f-strings
- Fixed Submission.update force kwarg not implemented.
- Small formatting changes, new TODO, noinspection on protected access
- Votes setter now removes duplicate keys (maintains order)
- Removed 'aiosqlite' from Pipfile general package requirements
This commit is contained in:
Xevion
2021-02-19 03:29:53 -06:00
parent 63f4c594b7
commit b311700356
4 changed files with 88 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ logger.setLevel(constants.LOGGING_LEVEL)
# TODO: Add command error handling to all commands
# TODO: Modify channel subject based on state
class ContestCommandsCog(commands.Cog, name='Contest'):
"""
@@ -39,6 +40,7 @@ class ContestCommandsCog(commands.Cog, name='Contest'):
# This prevents any cogs with an overwritten cog_command_error being handled here.
cog = ctx.cog
# noinspection PyProtectedMember
if cog and cog._get_overridden_method(cog.cog_command_error) is not None:
return