1
0
Fork 0
Commit graph

72 commits

Author SHA1 Message Date
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
954a02126e
format_links: parse punctuation inside brackets
Also, consolidate all punctuation tests into a single table-driven one.
2023-11-03 19:38:24 -03:00
7d13cbb10b
Add failing tests for reported bugs in format_links() 2023-11-03 19:38:23 -03:00
294788aa1a
format_links: refactor; support multiple punctuation 2023-11-03 19:38:23 -03:00
17d741039c
Remove duplicate test
(Test case already part of test_format_links_simple_url.)
2023-10-09 21:37:39 -03:00
c3c22022f6
Check for punctuation before checking for wrapping parenthesis
This allows to parse `(URL).` correctly, which was not detected
as URL before.
2023-10-09 21:09:51 -03:00
211b60bba2
Merge pull request #2934 from bookwyrm-social/reduce-status-tasks
Only trigger add_status_task when status is first created
2023-08-01 08:30:43 -07:00
3336fd0f11 Updates test 2023-07-31 17:48:09 -07:00
Joachim
e37ed8ea5e Remove links trailing punctuation 2023-07-31 22:12:37 +02:00
Josh Soref
0b30373bd3 spelling: mention'd
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
3b9828c0fc spelling: existing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
f1640399e3 Python formatting 2023-03-29 10:13:44 -07:00
4fcb01805e Fixes test comparison string 2023-03-29 09:14:30 -07:00
8a0e88db83 Adds test for links with # symbols 2023-03-29 08:39:41 -07:00
42dd199084 Unit test that identifies clashes between links and mentions 2023-03-29 08:28:45 -07:00
Christof Dorner
9ca9883e0b Enable finding existing hashtags case-insensitive
We should store hashtags case-sensitive, but ensures that an existing
hashtag with different case are found and re-used. for example,
an existing #BookWyrm hashtag will be found and used even if the
status content is using #bookwyrm.
2023-03-07 13:16:45 +01:00
Christof Dorner
f3334b1550 Render hashtag links with data-mention="hashtag" attribute 2023-03-07 13:16:45 +01:00
Christof Dorner
ba0fcccfc5 Link hashtags in status content 2023-03-07 12:55:36 +01:00
Christof Dorner
c68304a99b Parse hashtags and store them in CreateStatus view 2023-03-07 12:55:36 +01:00
317cf5fcf5 Generate fewer add_status_tasks
Previously, every time a status was saved, a task would start to add it
to people's timelines. This meant there were a ton of duplicate tasks
that were potentially heavy to run. Now, the Status model has a "ready"
field which indicates that it's worth updating the timelines. It
defaults to True, which prevents statuses from accidentally not being
added due to ready state.

The ready state is explicitly set to false in the view, which is the
source of most of the noise for that task.
2022-11-15 14:14:32 -08:00
5c3bb2da13 Refactors how mentions are collected
This should be quicker, because it queries the users in one go instead
of jumping straight to iterating over them, and it checks if a user
blocks the poster before allowing them to be tagged.
2022-08-05 14:06:39 -07:00
3f5bb41380 Unit test for creating rating status 2022-07-17 16:18:59 -07:00
d74d59a57b Disable pylint complaint 2022-07-15 09:33:13 -07:00
7fdfd0c9c7 Check permissions when creating a status 2022-07-15 09:26:52 -07:00
Joel Bradshaw
6d6ab9a531 Add .pylintrc with fixes for new pylint version 2022-06-05 14:38:03 -07:00
2d63bfb791 Updates views tests 2021-12-09 18:02:59 -08:00
e6a251fdad Updates mocks across tests 2021-11-12 10:07:38 -08:00
61a0b50b91 Test raw version is saved 2021-10-15 10:10:38 -07:00
e8f5678867 More test names 2021-10-15 10:10:25 -07:00
b9e6824360 Imrpove test names 2021-10-15 10:07:29 -07:00
9ac5384d68 Fixes test and css linter 2021-10-15 09:54:14 -07:00
1b1e557800 Updates app to use date instead of boolean 2021-10-15 09:08:10 -07:00
4002df04fc Send update activity on edit 2021-10-15 08:15:48 -07:00
e43cade6cc Test edit view 2021-10-14 19:13:02 -07:00
8a08d789cb Removes delete and redraft tests 2021-10-14 17:13:15 -07:00
767d378170 Update status tests 2021-09-27 18:52:45 -07:00
b7c2fb600a String formatting for status view tests 2021-09-22 10:55:51 -07:00
93d9e7b1a1
Merge pull request #1254 from bookwyrm-social/activitystreams-celery
Move activitystreams updates to tasks
2021-09-06 21:33:01 -07:00
2653458e56 another round of mocks 2021-09-06 18:40:12 -07:00
59400511c9 mocks mocks more mocks 2021-09-06 17:55:44 -07:00
227b72eaf9 Fixes mocks syntax 2021-09-06 15:09:04 -07:00
72d5238590 More mocks 2021-09-06 14:50:33 -07:00
bb94995389 Where you need one mock, you probably need the other 2021-09-06 14:48:45 -07:00
a6b0ba1826 Updates activistreams add_status mock 2021-09-06 13:53:49 -07:00
ccc41deb36 Retain whitespace in split for detecting urls 2021-09-02 13:36:01 -07:00
reesporte
4f321e5f33 fix link formatting issue, for real this time 2021-08-30 14:23:04 -05:00
reesporte
6e628fed38 formatting 2021-08-30 11:38:00 -05:00
reesporte
aa946e3ab7 add more test cases for link formatting 2021-08-30 11:12:27 -05:00
cbf5747308 Mock mocks mocks 2021-08-03 21:59:48 -07:00
be044bce0d Updates mocks 2021-08-03 10:25:53 -07:00