Wykres commitów

929 Commity (5c54575f291d725bb37360c8296b0a114cd5fc0c)

Autor SHA1 Wiadomość Data
Marnanel Thurman 5c54575f29 Add busby_1st to the master URLs 2020-04-29 20:32:51 +01:00
Marnanel Thurman f610465f9b rm apps.py from busby because it was breaking import.
rm busby's URLs from bowler's urls.py.
2020-04-29 19:29:51 +01:00
Marnanel Thurman 2c273d0311 busby_1st split out from bowler_pub. Intermediate checkin. 2020-04-29 17:58:51 +01:00
Marnanel Thurman 2275c428a3 simple README for bowler_pub 2020-04-29 17:20:42 +01:00
Marnanel Thurman 50d8ce0518 Split out part of the Statuses view to the new SpecificStatus view.
Variables in URLs are named "user" and "status" rather than all
being "id", since that was inviting bugs.

Tests updated.
2020-04-26 14:34:15 +01:00
Marnanel Thurman f537cfc451 fixed test, for previous 2020-04-26 12:56:35 +01:00
Marnanel Thurman 78f983a611 - <id> in a request for statuses is the user ID, not the ID of a
particular status.

- When the user posts a status via the API, don't attempt to convert
  the status text to HTML.
2020-04-25 18:36:47 +01:00
Marnanel Thurman 98dd7724cb rm space 2020-04-25 17:21:06 +01:00
Marnanel Thurman 64b9116e6c API urls use the primary key of the Person table and not the username! 2020-04-25 17:20:22 +01:00
Marnanel Thurman 3858c95426 Content of statuses, and notes (bios) of users, are interpreted as markdown
and returned as HTML.
2020-04-25 16:40:06 +01:00
Marnanel Thurman 42909bb629 removing "application" from the status serializer, since we're
not in a place to give the information. Added FIXME about why.
Updated test.
2020-04-25 16:12:04 +01:00
Marnanel Thurman c03a2ce3ea Status.url returns a reasonable value. Test for this is written.
Both Status and Person's uri property returns the value of their url properties for now.
2020-04-24 15:51:36 +01:00
Marnanel Thurman 445ea187f9 Image fields in trilby_api.Person return absolute URLs.
They are now optional in forms.

default_visibility in trilby_api.Person's "source" subfield
returns the display name (like, "public" instead of "A").

Tests added for trilby_api.Person's "source" subfield.

trilby_api.utils created, just to hold the visiblity
choices list, which is moved out of Status.
2020-04-24 15:39:51 +01:00
Marnanel Thurman f3a1e62887 "uri" for trilby_api.Person now returns the same as "url" 2020-04-24 14:21:42 +01:00
Marnanel Thurman 1653a0b354 Visibility of a status is limited to the four visibility values 2020-04-23 20:14:55 +01:00
Marnanel Thurman 7d4158ec02 "acct" is just the username for local accounts 2020-04-23 20:07:27 +01:00
Marnanel Thurman 7a4a278f0e user "id" field is an int 2020-04-23 19:38:18 +01:00
Marnanel Thurman f55de4589a Trilby's Person class has a method "by_name()" which looks up a Person by name (or URL). 2020-04-23 19:02:27 +01:00
Marnanel Thurman faad85af3d follow back 2020-04-22 17:23:53 +01:00
Marnanel Thurman 309a6986fb trilby's create_local_person passes its kwargs to Person's constructor.
Error message for unexpected HTTP status codes improved.
New tests: follow unknown user, and follow autofollow user.
The latter doesn't yet work.
2020-04-22 17:10:57 +01:00
Marnanel Thurman 83ebca57ad rm unused constant 2020-04-22 17:02:32 +01:00
Marnanel Thurman bbe00656d2 kepi.trilby_api.tests.__init__ no longer has standalone "get" and "post" functions.
test_notifications no longer depends on httpretty.
2020-04-22 17:00:26 +01:00
Marnanel Thurman b8b3bb1891 two more timeline tests 2020-04-22 16:54:36 +01:00
Marnanel Thurman d64ce1ff3d use the proper API endpoint for the public timeline 2020-04-22 16:48:57 +01:00
Marnanel Thurman 564bb291a0 First timeline tests (they fail) 2020-04-22 16:47:01 +01:00
Marnanel Thurman c53a2d03ef "unfollow" endpoint added; tests added; new signal added. 2020-04-20 19:17:54 +01:00
Marnanel Thurman 0f22fe7107 status test now adjusts expected fields because statuses_count is working 2020-04-20 18:32:54 +01:00
Marnanel Thurman e580b52682 as before, but with "following" fixed! 2020-04-20 18:29:28 +01:00
Marnanel Thurman e18a915b4e Implementation of Person.follower_count, following_count,
followers, following, and status_count. Tests for all of these
except status_count.
2020-04-20 18:23:04 +01:00
Marnanel Thurman 248ee46d87 Renamed Follow related-names to "rel_*" because they were clashing with accessors in Person 2020-04-20 18:22:25 +01:00
Marnanel Thurman fe21b73a0f rm one stub, because "get account" == "get user" 2020-04-19 20:59:42 +01:00
Marnanel Thurman 26f9ce8133 account details in a status don't give the "source" param 2020-04-19 17:05:57 +01:00
Marnanel Thurman c30bd5a63a operate on a copy of ACCOUNT_STATUS so as not to spoil the original 2020-04-19 17:05:37 +01:00
Marnanel Thurman 98035261ce Trilby's *_EXPECTED constants are now dicts, which means the update_credientials can search in the "source" dict properly. 2020-04-19 17:01:19 +01:00
Marnanel Thurman f05fd36da0 update_credentials 2020-04-19 16:52:55 +01:00
Marnanel Thurman 66cec9a1c3 draft test for patching update_credentials 2020-04-19 16:19:20 +01:00
Marnanel Thurman 5d1dda99cb More Trilby tests are using TrilbyTest's get, post, etc instead of the standalone ones
(which are going away soon)
2020-04-19 16:10:57 +01:00
Marnanel Thurman dc3ce6c2f4 TrilbyTest's get, post, etc gain "expect_result" and "parse_result" params 2020-04-19 16:10:08 +01:00
Marnanel Thurman 33e23f39bb Status lookup is read-only for unauth'd users 2020-04-19 16:09:32 +01:00
Marnanel Thurman 45e565ae66 Code which uses Person doesn't have to bother about TrilbyUsers at all. 2020-04-19 00:13:50 +01:00
Marnanel Thurman bd7454d4ff Slightly more informative error message if the account fields test fails 2020-04-19 00:13:34 +01:00
Marnanel Thurman eb8d655008 trilby test client passes data to POST requests correctly 2020-04-18 23:57:47 +01:00
Marnanel Thurman 72085c635d test_get_all_statuses was really a timeline test; removed
also removed slash from the end of "statuses/" path
2020-04-18 23:57:18 +01:00
Marnanel Thurman b245f467b1 Simple account retrieval doesn't give you "source" for your own account 2020-04-18 23:45:38 +01:00
Marnanel Thurman 8c5949fc43 Look up local user by username (rather than by id as in the old system) 2020-04-18 23:45:12 +01:00
Marnanel Thurman a8186fa585 trilby tests:
- ACCOUNT_EXPECTED etc moved to __init__
 - the path param to get, post, etc is called "path" not "url"
 - _create_alice in TrilbyTestCase for now
 - get, post, etc methods in TrilbyTestCase
     (the existing standalone functions are still there for now
      to avoid breaking stuff we're going to refactor soon)
 - test_post_multiple_statuses removed bc pointless
 - test for custom emojis moved to test_instance and
      its path fixed to the correct one
2020-04-16 17:25:17 +01:00
Marnanel Thurman d80ae73e5c test_integration and test_rest merged into the other tests;
some tests still breaking
2020-04-16 16:39:38 +01:00
Marnanel Thurman 0f8937b917 On trilby tests:
- tests which were expecting 201 now expect 200.
 - test_instance, all stubs
 - test_search, all stubs
 - many new stubs so we have (stub) API coverage
2020-04-16 16:22:45 +01:00
Marnanel Thurman eafe450836 trilby test_account (all stubs) 2020-04-16 16:07:18 +01:00
Marnanel Thurman 84bdc26ee1 Reblog / unreblog / reblogged_by views 2020-04-15 18:25:24 +01:00