| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
| |
One of the test_time methods did not actually assert the exception message it was trying to detect as the assertion statement was contained within the context manager handling the exception. I've moved it out of the context so it actually runs.
I've also added a few `praga: no cover` comments for parts that were artifically lowering coverage of the test suite.
|
| |
|
|
|
|
| |
Python 3.8 introduced an `unittest.mock.AsyncMock` class that can be used to mock coroutines and other types of asynchronous operations like async iterators and async context managers. As we were using our custom, but limited, AsyncMock, I have replaced our mock with unittest's AsyncMock.
Since Python 3.8 also introduces a different way of automatically detecting which attributes should be mocked with an AsyncMock, I've changed our CustomMockMixin to use this new method as well. Together with a couple other small changes, this means that our Custom Mocks now use a lazy method of detecting coroutine attributes, which significantly speeds up the test suite.
|
| |
|
|
| |
I forgot to remove one pytest test file during the migration from pytest to unittest. Since we have sinced added a unittest version of the same file, I've now removed the lingering pytest file.
|
| |
|
|
| |
Since we upgraded to Python 3.8, we can now use the new IsolatedAsyncioTestCase test class to use coroutine-based test methods instead of our own, custom async_test decorator. I have changed the base class for all of our test classes that use coroutine-based test methods and removed the now obsolete decorator from our helpers.
|
| |
|
|
|
|
| |
We used inheritence to add additional logging assertion methods to unittest's TestCase class. However, with the introduction of the new IsolatedAsyncioTestCase this extension strategy means we'd have to create multiple child classes to be able to use the extended functionality in all of the TestCase variants.
Since that leads to undesirable code reuse and an inheritance relationship is not at all needed, I've switched to a mixin-composition based approach that allows the user to extend the functionality of any TestCase variant with a mixin where needed.
|
| |
|
|
|
|
| |
I've changed the Python version in our Pipfile to Python 3.8. The main advantage of Python 3.8 is that it comes with significant upgrades to the unittest module which allow us to test asyncio-based code more easily. While our current test suite runs in P3.8 "out of the box", it currently still relies on many of the workarounds we had to use to test asynchronous code in Python 3.7. A future commit will replace these workarounds with the new tools available in Python 3.8.
This commit also updates our discord.py version to 1.3.2. Versions of discord.py <= 1.3.1 contain a bug that causes errors in the new unittest tools that come with Python 3.8. For more specific details, see https://github.com/Rapptz/discord.py/pull/2570.
|
| |\
| |
| | |
Reminder Embed Enhancements & Whitelist Expansion
|
| | |\
| |/
|/| |
|
| | | |
|
| |\ \
| | |
| | | |
Check reminder user and channel before send and schedule.
|
| | |\ \
| |/ /
|/| | |
|
| |\ \ \
| | | |
| | | | |
Change verification post log level to info, tidy code.
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \
| | | | |
| | | | | |
Fix missing Django logs when using Docker Compose
|
| | |\ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixed by allocating a pseudo-tty to the web and bot services in Docker
Compose.
|
| |\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Reduce log level of tag cooldown notice.
|
| |/ / / / / |
|
| | |/ / /
|/| | | |
|
| |\ \ \ \
| | | | |
| | | | | |
Refactor information.py with lots of changes that makes the overall code cleaner and faster
|
| | |\ \ \ \
| |/ / / /
|/| | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Fix paginator erroring on clearing reactions from non-existing messages.
|
| | |\ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
python-discord/optimize/pagination/emoji_collection_structure
Pagination migrations - Emoji Data Structure Modified
|
| | |\ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Don't log exception traceback on Forbidden for welcomes.
|
| |/ / / / / / / |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Changed the pagination emoji collection from list to tuple
This change was suggested since this collection is constant
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
__class__ attribute, and re-add the None check for !user roles.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(hopefully).
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
second cannot be true making it unneccesary to check
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
for just 1 or 2 uses (e.g. Union, and Message).
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
to a list, and then send them it at once (less spammy)
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
and non-verified users cannot use this command.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
the list
|
| | | | | | | | |
|
| | |_|_|_|/ /
|/| | | | | |
|
| | |/ / / /
|/| | | | |
|
| | | | | | |
|
| | | | | | |
|