Commit graph

76 commits

Author SHA1 Message Date
Bart Schuurmans 03ac846b5d Migrate from pytz to zoneinfo 2024-04-25 10:14:07 +02:00
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ó 4b9fe0af0c Remove nesting in several with..patch calls 2024-03-17 20:57:39 -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
Wesley Aptekar-Cassels 3e78e398c0 Switch from priority queues to function-based queues
Fixes: #2907
2023-07-20 12:25:30 -04:00
Giebisch 3295d419bf Add Test for Import Limit 2022-12-19 23:25:43 +01:00
Mouse Reeve d4351cfcb4
Merge branch 'main' into import-limit 2022-12-16 12:44:57 -08:00
Giebisch df54df8309 Added Import Limit 2022-12-15 23:43:25 +01:00
Rick Osborne 862260294a
StoryGraph import ISBN tweak
Looks like SG updated their CSV headers just a little, so that the importer
hadn't been picking up the ISBN.
2022-12-02 19:16:22 -08:00
Mouse Reeve 141d3aa813 Updates mocks in tests 2022-11-07 09:50:05 -08:00
André Jaenisch 62c7661fb9
Reformat tests using black
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 21:31:56 +02:00
André Jaenisch 22fcb61fb2
Write tests for Calibre importer
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 13:08:01 +02:00
André Jaenisch 6bd9b725e2
Refactor hard-coded strings with a reference to a static property
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 13:07:25 +02:00
Mouse Reeve a92bf785dd Updates init files for pylint 2022-04-08 14:16:05 -07:00
Mouse Reeve 4de406afe1 Some tests fixes 2021-12-30 11:07:04 -08:00
Mouse Reeve 975ef7d38e Merge branch 'main' into list-not-loading 2021-12-30 10:44:23 -08:00
Mouse Reeve a9ff23ece0 Fixes nondeterministic test failure 2021-12-29 13:44:04 -08:00
Mouse Reeve 6745cd73cc Deterministic ordering for OL import test 2021-12-28 15:53:35 -08:00
Mouse Reeve 5e932711f9 Merge branch 'main' into list-not-loading 2021-12-15 09:56:33 -08:00
Mouse Reeve e6d500df6b Removes debugging print statements 2021-12-14 19:52:43 -08:00
Mouse Reeve 6ba5d53d38 trying item.last instead of going by list lookup 2021-12-14 19:46:35 -08:00
Mouse Reeve 69204a1c94 More print statements 2021-12-14 19:38:28 -08:00
Mouse Reeve 6af2182879 Test print statements 2021-12-14 19:20:29 -08:00
Mouse Reeve 8cb2e74c81 Uncomment test 2021-12-14 19:05:45 -08:00
Mouse Reeve 86fcaad72c Comments out failing test 2021-12-14 18:47:17 -08:00
Mouse Reeve 3545085a7d Fixes tests 2021-12-14 14:19:27 -08:00
Mouse Reeve bee3c86223 Lookup by openlibrary key 2021-12-14 12:49:00 -08:00
Mouse Reeve 4f1d4d9bc0 Adds openlibrary keys to data 2021-12-14 12:42:56 -08:00
Mouse Reeve bb69c32a6c Adds support for openlibrary csv shelf name format 2021-12-14 11:58:56 -08:00
Mouse Reeve acde30887d Importer tests 2021-12-09 20:12:06 -08:00
Mouse Reeve 8612cf654d Invalid href 2021-11-14 11:31:47 -08:00
Mouse Reeve f92863ad3e Notify when import completes 2021-11-14 09:56:23 -08:00
Mouse Reeve 9e673834dc Check for duplicates 2021-11-14 08:35:16 -08:00
Mouse Reeve bdc3f6828b Python formatting 2021-11-14 07:11:48 -08:00
Mouse Reeve c614f638fd Merge branch 'import-field-names' of github.com:bookwyrm-social/bookwyrm into import-field-names 2021-11-14 07:06:48 -08:00
Mouse Reeve 32d0d8d027 Expand librarything csv processing tests 2021-11-13 13:04:54 -08:00
Mouse Reeve 7f06ee3844 Fixes getting isbn for librarything imports 2021-11-13 12:46:27 -08:00
Mouse Reeve fb91c33682 Fixes isbn assignment for goodreads 2021-11-13 12:24:16 -08:00
Mouse Reeve a9622942cd Test correctly adding goodreads isbns 2021-11-13 12:11:07 -08:00
Mouse Reeve 1e46de4c9d Associate imported review with import item 2021-11-13 11:44:05 -08:00
Mouse Reeve 644d969330 Fixes importer tests 2021-11-13 11:22:07 -08:00
Mouse Reeve 232e051dcb Fixes import job creates in tests 2021-11-13 10:16:05 -08:00
Mouse Reeve d3f23b4a0a Updates calls in tests 2021-11-13 09:50:56 -08:00
Mouse Reeve 08f4ad6cd4 Fixes call to import task 2021-11-13 09:02:42 -08:00
Mouse Reeve b784dcdb46 Removes uninformative test 2021-11-12 15:07:26 -08:00
Mouse Reeve 309d289a65 A few more mocks 2021-11-12 10:49:49 -08:00
Mouse Reeve e6a251fdad Updates mocks across tests 2021-11-12 10:07:38 -08:00
Mouse Reeve f71ef286b6 Updates mocks 2021-11-12 08:55:47 -08:00