Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to ensure that infractions sent to the DB are NOT truncated (even if so on Discord's side) #2955

Closed
ichard26 opened this issue Mar 12, 2024 · 0 comments · Fixed by #2997
Assignees
Labels
a: tests Related to tests (e.g. unit tests) p: 3 - low Low Priority s: planning Discussing details t: enhancement Changes or improvements to existing features

Comments

@ichard26
Copy link
Member

ichard26 commented Mar 12, 2024

Moving this below

        if reason:
            reason = textwrap.shorten(reason, width=512, placeholder="...")

causes a change in behaviour.

I assume the behaviour we want is for the full message to be sent to the database, but the reason to be trimmed in the audit log (I assume because there's a limit there), but now it's also trimmed in the database.

Originally posted by @wookie184 in #2316 (comment)


We should modify the tests to catch this too

class TruncationTests(unittest.IsolatedAsyncioTestCase):

You can do that here if you want otherwise I can open an issue for it.

@ichard26 ichard26 added s: planning Discussing details p: 3 - low Low Priority a: tests Related to tests (e.g. unit tests) t: enhancement Changes or improvements to existing features labels Mar 12, 2024
@wookie184 wookie184 self-assigned this Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests Related to tests (e.g. unit tests) p: 3 - low Low Priority s: planning Discussing details t: enhancement Changes or improvements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants