Commit graph

16 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
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
Adeodato Simó 8afcb9b6d3
Fix tests warning: ImportJob.updated_date received a naive datetime 2023-10-15 22:03:45 -03:00
Mouse Reeve 49d0590599 Another tweak to how import wait times are calculated 2022-11-10 13:59:27 -08:00
Mouse Reeve f80e2465ed Adds tests for recent import average time 2022-11-10 12:29:36 -08:00
Mouse Reeve 6e748c5476 Typo fix 2022-11-05 18:16:59 -07:00
Mouse Reeve 3d6266cca2 Merge branch 'main' into list-not-loading 2021-12-14 09:17:00 -08:00
Mouse Reeve 00fdca681f Fixes retry test 2021-12-10 12:16:33 -08:00
Mouse Reeve 9f04919bec Remove unrelated tests changes
these will happen elsewhere
2021-12-10 11:44:38 -08:00
Mouse Reeve 10c74d0619 Additional import tests 2021-12-10 11:41:54 -08:00
Mouse Reeve acde30887d Importer tests 2021-12-09 20:12:06 -08:00
Mouse Reeve c3156a1de5 Fixes import path in test 2021-11-13 10:22:28 -08:00
Mouse Reeve 628f104b13 Separates out imports views tests 2021-11-13 10:16:25 -08:00
Mouse Reeve 3bdda973bc Creates subdirectory for import views tests 2021-11-13 09:52:09 -08:00
Renamed from bookwyrm/tests/views/test_import.py (Browse further)