aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Ionite <[email protected]>2023-02-08 12:04:30 -0500
committerGravatar Ionite <[email protected]>2023-02-08 12:04:30 -0500
commita59eaf405eb91ce8c2961b820a0a9ae44d2215e1 (patch)
tree0141b4abe145e5bbd1a92199c7de0d788fc11775 /tests
parentUpdate file error messages (diff)
Update unit tests for file error message changes
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/utils/snekbox/test_snekbox.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/bot/exts/utils/snekbox/test_snekbox.py b/tests/bot/exts/utils/snekbox/test_snekbox.py
index 8f4b2e85c..9dcf7fd8c 100644
--- a/tests/bot/exts/utils/snekbox/test_snekbox.py
+++ b/tests/bot/exts/utils/snekbox/test_snekbox.py
@@ -130,20 +130,16 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase):
"""EvalResult.files_error_message, should return files error message."""
cases = [
([], ["abc"], (
- "Failed to upload 1 file (abc)."
- " File sizes should each not exceed 8 MiB."
+ "1 file upload (abc) failed because its file size exceeds 8 MiB."
)),
([], ["file1.bin", "f2.bin"], (
- "Failed to upload 2 files (file1.bin, f2.bin)."
- " File sizes should each not exceed 8 MiB."
+ "2 file uploads (file1.bin, f2.bin) failed because each file's size exceeds 8 MiB."
)),
(["a", "b"], ["c"], (
- "Failed to upload 1 file (c)"
- " as it exceeded the 2 file limit."
+ "1 file upload (c) failed as it exceeded the 2 file limit."
)),
(["a"], ["b", "c"], (
- "Failed to upload 2 files (b, c)"
- " as they exceeded the 2 file limit."
+ "2 file uploads (b, c) failed as they exceeded the 2 file limit."
)),
]
for files, failed_files, expected_msg in cases:
@@ -411,7 +407,7 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase):
self.assertTrue(
res.startswith("@user#7700 :white_check_mark: Your 3.11 eval job has completed with return code 0.")
)
- self.assertIn("Some files with disallowed extensions can't be uploaded: **.disallowed**", res)
+ self.assertIn("Files with disallowed extensions can't be uploaded: **.disallowed**", res)
self.cog.post_job.assert_called_once_with(job)
self.cog.upload_output.assert_not_called()