Commit graph

18 commits

Author SHA1 Message Date
Bart Schuurmans ffee29d8e2 Fix resource leaks
Rewrite places where files (or other resources) are opened but not closed to "with" blocks, which
automatically call close() at the end of the scope.

Also simplify some tests where images need to be saved to a model field: an opened file can be
passed directly to FileField.save().
2024-03-29 20:14:10 +01:00
Adeodato Simó e2c9ea3cd2 Fix instances of bad-classmethod-argument in recently edited files 2024-03-17 21:28:55 -03:00
Adeodato Simó 1b9e0546e6 Bracket-wrap calls to patch() for better readability 2024-03-17 20:34:12 -03:00
Wesley Aptekar-Cassels 6cd2c91135 Allow page numbers to be text, instead of integers.
Fixes: #2640
2024-01-04 19:09:39 -05:00
Adeodato Simó 9d502f5ee2
Use setUpTestData() to speed up tests
Pylint's `bad-classmethod-argument` is disabled for each definition
to avoid rewriting the method bodies just to rename `self` → `cls`.
This can be done gradually, as the setUpTestData methods are modified
along the way.
2023-12-11 19:40:30 -03:00
Giebisch 21575fbf3f Unused variable fix 2023-02-06 14:09:53 +01:00
Giebisch f65e0b7632 Add Quotation endposition test 2023-02-06 14:00:04 +01:00
Mouse Reeve 3d6266cca2 Merge branch 'main' into list-not-loading 2021-12-14 09:17:00 -08:00
Mouse Reeve 936f045344 Adds resolve book view test 2021-12-09 19:36:12 -08:00
Mouse Reeve d9d0919ad4 More mocks for more tests 2021-12-09 19:14:10 -08:00
Mouse Reeve cf26f48d5c Adds view tests 2021-12-07 13:05:31 -08:00
Mouse Reeve e6a251fdad Updates mocks across tests 2021-11-12 10:07:38 -08:00
Mouse Reeve a7614d8c35 Moves editions page tests into separate file 2021-10-01 09:24:10 -07:00
Mouse Reeve bdb1d1998a Helper function for html validation 2021-09-30 22:22:20 -07:00
Mouse Reeve 9c78a9d95c test fixes 2021-09-30 22:02:07 -07:00
Mouse Reeve ccc52287c5 More error filtering 2021-09-30 20:01:57 -07:00
Mouse Reeve 0dc6a18201 Skip unescaped chars warning in html validator
jankily
2021-09-29 15:47:30 -07:00
Mouse Reeve 47b08e7591 Moves tests into dirs and updates render checks 2021-09-29 14:21:57 -07:00
Renamed from bookwyrm/tests/views/test_book.py (Browse further)