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
Giebisch
df54df8309
Added Import Limit
2022-12-15 23:43:25 +01: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
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
acde30887d
Importer tests
2021-12-09 20:12:06 -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
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
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
Mouse Reeve
f3bcced0a0
Adds shelf mappings
2021-11-11 12:29:38 -08:00
Mouse Reeve
147dd95e8d
Removes unused import
2021-11-11 11:59:15 -08:00
Mouse Reeve
20baf9385d
Updates goodreads tests
2021-11-11 09:22:44 -08:00
Mouse Reeve
20c6a3ea1c
Creates generic importer test file
...
And removes some tests that duplicate the generic tests
2021-11-10 09:32:53 -08:00
Mouse Reeve
92f9319fe1
Updates tests that reference self_connector
2021-09-30 11:46:17 -07:00
Mouse Reeve
4cdf895d77
Removes references to local field in connector tests
2021-09-16 12:29:02 -07:00
Mouse Reeve
59400511c9
mocks mocks more mocks
2021-09-06 17:55:44 -07:00
Mouse Reeve
227b72eaf9
Fixes mocks syntax
2021-09-06 15:09:04 -07:00
Mouse Reeve
72d5238590
More mocks
2021-09-06 14:50:33 -07:00
Mouse Reeve
bb94995389
Where you need one mock, you probably need the other
2021-09-06 14:48:45 -07:00
Mouse Reeve
a6b0ba1826
Updates activistreams add_status mock
2021-09-06 13:53:49 -07:00
Mouse Reeve
be044bce0d
Updates mocks
2021-08-03 10:25:53 -07:00
Mouse Reeve
cfbe1b29cd
Pass update fields when ticking last active date
2021-08-03 09:12:22 -07:00
Mouse Reeve
6d8bced0f1
Refactors test mocks
2021-08-02 16:05:40 -07:00
Joel Bradshaw
f867b1c81d
Update tests for shelved_date
...
Also make dates while we're at it
2021-07-13 22:08:15 -07:00
Joachim
2ea1cd8319
Tests
2021-05-26 23:57:29 +02:00
Mouse Reeve
3ade2d3bb1
New version of black, new whitespace
2021-04-26 09:15:42 -07:00
Mouse Reeve
5deb7d8bba
Updates librarthing importer tests
2021-03-30 09:13:41 -07:00
Mouse Reeve
754ccaedd6
Move importers into module
2021-03-30 09:03:57 -07:00