|  | Commit message (Collapse) | Author | Age | Lines | 
|---|
| |\ |  | 
| | | |  | 
| |/  
|   
|   
|   
|   
|   
|   
| | Some of the tests were failing because they were expecting send_webhook
to be a method of the DuckPond cog, other tests simply were no longer
applicable, and have been removed.
https://github.com/python-discord/bot/issues/667 | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| |\ |  | 
| | |\ |  | 
| | | |\ |  | 
| | | | |\ |  | 
| | | | | |\ |  | 
| | | | | | |\ |  | 
| | | | | | |\ \ |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | We're gonna need this for the help channel handling, and it seems like a
reasonable type to support anyway. It requires a tiny bit of special
handling, but nothing outrageous. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It just makes more sense to me to filter out messages at an earlier
stage. | 
| | | | | | |_|/  
| | | | |/| |   
| | | | | | |   
| | | | | | |   
| | | | | | | | It's a private channel so there's no risk of a token "leaking".
Furthermore, messages cannot be deleted in DMs. | 
| | | | |/ / / |  | 
| | | | | | | 
| | | | | | 
| | | | | | 
| | | | | | | - Remove embed attributes checks
- Replace `self.dev_log.assert_awaited_once_with` with `self.dev_log.assert_awaited_once`. | 
| | | |\ \ \ \ |  | 
| | | | | | | | |  | 
| | | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | | Need to compare the IDs against each other rather than the Guild object
against the ID. | 
| | | | | | | | 
| | | | | | | 
| | | | | | | 
| | | | | | | | 404s probably mean the user is from another guild. | 
| | | |_|/ / /  
| |/| | | | |  | 
| | |\ \ \ \ \  
| | | | | | | 
| | | | | | | | Make token detection more robust and completely rewrite its tests | 
| | | |\ \ \ \ \  
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | bug/filters/928/non-ascii-token | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It's redundant; there's no benefit here in abstracting two lines of code
into a function. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | This covers the case when a token is matched, but its user ID and
timestamp turn out to be invalid. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It now supports the changes that switched to finditer, added match
groups, and added the Token NamedTuple. It also accounts for the
is_maybe_token function being removed.
For the sake of simplicity, call assertions on is_valid_user_id and
is_valid_timestamp were not made. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The function was removed due to redundancy. Therefore, its tests are
obsolete. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The tests for valid inputs and invalid inputs were split to make them
more readable. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | `find_token_in_message` now uses the latter so the tests should adjust
accordingly. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It has to account for the addition of groups. It's easiest to compare
the entire string so `finditer` is used to return re.Match objects;
the tuples of `findall` would be cumbersome. Also threw in a change
to use `assertCountEqual` cause the order doesn't really matter. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It was broken due to the addition of groups. Rather than returning the
full match, `findall` returns groups if any exist. The test was
comparing a tuple of groups to the token string, which was of course
failing. Now `fullmatch` is used cause it's simpler - just check for
`None` and don't worry about iterating matches to search. | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The test now ensures the cog is instantiated and that the instance is
passed as an argument to `add_cog`. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Remove `bot.get_cog` mocks in `setUp`
* Mock the logger cause it's easier to assert logs
* Remove subtests
* Assert helper functions were called
* Create an autospec for ModLog | 
| | | | | | | | | |  | 
| | | | | | | | | |  |