Bart Schuurmans
4f58b11330
Include the correct protocol and port in remote IDs
2024-04-24 15:35:19 +02:00
Bart Schuurmans
c42db40a63
Construct absolute URLs with the correct protocol and port
2024-04-24 15:30:47 +02:00
Adeodato Simó
4304cd4a79
use re.escape
2024-04-13 21:26:41 -03:00
Adeodato Simó
8733369605
test_quotation_page_serialization: add test with no position
2024-04-13 21:26:41 -03:00
Adeodato Simó
df78cc64a6
Quotation._format_position: do not treat page numbers as integers
...
Fixes : #3352
2024-04-13 21:26:41 -03:00
Adeodato Simó
f844abcad9
test_quotation_page_serialization: use strings for page numbers
...
This follows from #3273 , "Allow page numbers to be text, instead of
integers".
2024-04-13 21:26:39 -03: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ó
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ó
80a1180090
Include author name when serializing Quotation
2023-09-25 16:03:16 -03:00
Adeodato Simó
cc05cabcb5
Note content: use italics for book titles + em-dash for Quotation
2023-09-23 17:49:38 -03:00
Adeodato Simó
ce3885d4f6
Use endposition
when serializing Quotation
2023-09-17 15:18:48 -03:00
Adeodato Simó
1322a0c693
Substitute “p.” for “page” in page progress serialization
2023-09-17 15:18:21 -03:00
Joeri de Ruiter
8736f2c6ef
Remove '@' from the beginning of hashtag names in activity
2023-07-28 11:20:08 +02:00
Josh Soref
2a914f98b7
spelling: versions
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Christof Dorner
824d4207dc
Try and fix a flaky test
...
Same case as with #2496 , for some reason the URL to the cover just ends with `test.jpg`
2023-03-07 12:59:32 +01:00
Mouse Reeve
bb5564461c
Merge pull request #2398 from bookwyrm-social/html-in-activitypub
...
Render markdown to html when using activitypub
2022-12-11 13:43:36 -08:00
Mouse Reeve
b4ddf281b5
Trying to fix an unreliable unit test regex
2022-12-11 11:13:16 -08:00
Mouse Reeve
bffde6703c
Merge branch 'main' into html-in-activitypub
2022-12-05 17:46:31 -08:00
Fedor Indutny
cdc833657f
Fix serialization of JSON-LD subarrays
...
Properties like "tag" could be lists containing multiple subclasses of
ActivityObject. Make sure to serialize them recursively instead of
outputting them as they are, because otherwise we could get a bunch of
nulls in the resulting JSON and that wouldn't necessarily be a valid
JSON-LD object.
Fix : #2451
2022-12-04 18:12:39 -08:00
Mouse Reeve
2d3ec93086
Updates unit tests
2022-11-17 14:06:43 -08:00
Mouse Reeve
bbdba9e793
Python formatting
2022-11-10 13:13:53 -08:00
Mouse Reeve
8f2de48b0a
Comments out unrelated test block
2022-11-10 13:05:42 -08:00
Mouse Reeve
37bcb031f7
Adds notification model unit tests
2022-07-05 16:03:25 -07:00
Mouse Reeve
9d275db322
Updates ignore boost logic that no longer produces errors
2022-05-26 09:57:39 -07:00
Mouse Reeve
e47b5e788d
Remove link form review title
...
html isn't supported in the name field I guess
2022-01-18 13:31:50 -08:00
Mouse Reeve
41c3eceb68
Updates tests
2022-01-18 13:19:04 -08:00
Mouse Reeve
57a05e239b
Python formatting
2022-01-12 11:17:30 -08:00
Mouse Reeve
24045685e1
Updates tests
2022-01-12 11:03:04 -08:00
Mouse Reeve
eb4a399472
Updates models tests
2021-12-09 12:43:09 -08:00
Mouse Reeve
309d289a65
A few more mocks
2021-11-12 10:49:49 -08:00
Mouse Reeve
8c4e8361f2
Fixes tests
2021-11-11 13:35:56 -08:00
Joachim
56fd147c88
Update test_status_model.py
2021-10-27 19:00:09 +02:00
Joachim
b956b79bd0
Add full URL generation to image_serializer
2021-10-27 18:56:37 +02:00
Mouse Reeve
9d4e0851a0
Merge branch 'main' into image-absolute-url-getter
2021-10-20 15:12:06 -07:00
Mouse Reeve
66a2b4c7c7
Tests for status raise_visible_to_user function
2021-10-15 13:25:47 -07:00
Mouse Reeve
0cd55147ee
Set thread id on parent status
2021-10-01 14:41:30 -07:00
Mouse Reeve
7ff040470f
Use more f strings in status models test file
2021-10-01 14:26:01 -07:00
Mouse Reeve
59400511c9
mocks mocks more mocks
2021-09-06 17:55:44 -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
820eeeb69a
Lowercase "rate"
2021-08-09 07:29:08 -07:00
Joachim
bc7710a4a7
Update Status Model Test
2021-08-04 18:18:18 +02:00
Mouse Reeve
be044bce0d
Updates mocks
2021-08-03 10:25:53 -07:00
Mouse Reeve
6d8bced0f1
Refactors test mocks
2021-08-02 16:05:40 -07:00
Mouse Reeve
973b23856c
Merge branch 'main' into opengraph-image-generation
2021-06-17 15:17:54 -07:00
Mouse Reeve
8b657bbcb1
Updates model test
2021-06-17 12:58:37 -07:00
Mouse Reeve
8946332023
More fixes for more tests
2021-06-14 16:56:47 -07:00
Mouse Reeve
c3a09a6331
More test fixes
2021-06-14 16:39:54 -07:00