Wykres commitów

1259 Commity (main)

Autor SHA1 Wiadomość Data
Marnanel Thurman 550b56d537 Person.lookup now uses find_local_view() instead of a RE 2020-07-16 19:38:43 +01:00
Marnanel Thurman 450cca5d1d find_local_view(), plus tests. 2020-07-16 19:27:41 +01:00
Marnanel Thurman 02c0941744 various fixes to TestCreate; test_with_mentions still fails but
all others either pass, skip, or expectedFail.
2020-07-15 19:28:11 +01:00
Marnanel Thurman 3a881296f0 When create() looks up message['object']['type'], it now catches
and ignores TypeError, since "object" can validly be a string.
If it is a string, we can't do anything with its type anyway.

Validation tests now pass.
2020-07-15 18:49:37 +01:00
Marnanel Thurman 10a05c1835 test_public passes 2020-07-15 03:55:59 +01:00
Marnanel Thurman 6cd61046dc skip test_private, for now-- spec is ambiguous and we're going
to have to read through masto's code
2020-07-15 03:38:30 +01:00
Marnanel Thurman 5fa254d764 Status gains 'text' property, at present a synonym of 'content' 2020-07-14 21:10:21 +01:00
Marnanel Thurman b4cce9fc0f indentation 2020-07-14 21:07:57 +01:00
Marnanel Thurman ad93d08093 test_limited may be a mistake in the Mastodon docs 2020-07-14 21:07:18 +01:00
Marnanel Thurman 396af7823e bowler_pub.create now takes account of audience to calculate
visbility.

TestCreate.test_direct passes.
2020-07-14 20:56:02 +01:00
Marnanel Thurman 9738af96a0 _send_create_for_object returns the created object (if it's a Status)
in the way it used to
2020-07-11 23:36:21 +01:00
Marnanel Thurman 489fd453e0 test_create's as_reply_to test passes. Lots still to do here. 2020-07-11 23:29:12 +01:00
Marnanel Thurman d77a43befd trilby's Status gains methods and properties:
- conversation (stub)
	- is_reply (working)
	- in_reply_to_account_id (working)
	- thread (working)
	- __str__ (working)
	- lookup (class method, working)
2020-07-11 23:27:21 +01:00
Marnanel Thurman 287aef2b3b bowler_pub's create() chooses its helper function based on the
type of the activity's object as well as the activity's own type.

Helper function for creating Notes added.
2020-07-11 23:23:53 +01:00
Marnanel Thurman e8be446910 first param of a class method is "cls", not "self" 2020-07-11 23:23:06 +01:00
Marnanel Thurman 82c52d157c DummyMessage has a __str__, so that debug logs look a little less weird 2020-07-09 00:14:18 +01:00
Marnanel Thurman 14c32dc823 fixing up bowler's test_create for trilby-heavy. This has brought
the tests to the point where we can see they're not passing. :)
2020-07-09 00:10:53 +01:00
Marnanel Thurman 0c8a0c0dae validate() can now have Content-Type missing in the headers;
it defaults to "application/activity+json".
2020-07-09 00:10:13 +01:00
Marnanel Thurman 1d70f9dd43 Test for "/users" (list all posts by all users) removed as it doesn't exist in the spec.
Test for tombstones skipped.
2020-07-07 22:58:47 +01:00
Marnanel Thurman 880f634d4f Cut ThingView from bowler's views.
Rename ActorView to PersonView and fix up its activity_get.
2020-07-03 19:27:08 +01:00
Marnanel Thurman 7f642ac325 Add fields to trilby's LocalPerson needed by bowler's PersonSerializer;
these are all *_url methods.
2020-07-03 19:26:28 +01:00
Marnanel Thurman 87c2f34447 k.bowler_pub.views exports PersonView 2020-07-03 19:26:00 +01:00
Marnanel Thurman 48f62a02a1 Put PersonView back into the dispatcher (under its new name) 2020-07-03 19:25:39 +01:00
Marnanel Thurman 855e67a55e Adjust Person constructor in test: "summary" field in Person is now "note".
Check HTTP status codes of responses.
2020-07-03 19:24:48 +01:00
Marnanel Thurman 5df81be9b7 import logging (idk why it wasn't already imported) 2020-07-03 19:24:28 +01:00
Marnanel Thurman 2f3a0a8483 Add PersonSerializer and related classes.
Rm testing string.
2020-07-03 19:23:45 +01:00
Marnanel Thurman 8e6684bfca rm circular include 2020-07-03 16:56:25 +01:00
Marnanel Thurman 81430b55b2 All the other validation tests pass 2020-07-02 17:21:25 +01:00
Marnanel Thurman 279e2fd1a4 test_remote_user_gone fixed 2020-07-02 17:13:35 +01:00
Marnanel Thurman c5fb707b80 remote_user_known test passes 2020-07-02 16:55:09 +01:00
Marnanel Thurman adb474be5e Uncouple validation of incoming messages from checking the status codes of their referents 2020-07-01 18:50:05 +01:00
Marnanel Thurman 4b4fffba66 Add create() for bowler(). At present it only creates Follows.
bowler's validate() calls the newly-written create().

trilby_api.models.Person.lookup() added.
2020-07-01 18:32:55 +01:00
Marnanel Thurman 170d55141d IncomingMessage is back in bowler_pub.validation.
Validation itself now works, but it doesn't know what to do
with the messages once it's validated them any more.
That's next to put back in.
2020-06-20 00:50:59 +01:00
Marnanel Thurman 86d10e50a4 Improved bowler's validation testing. It now fails, as you might expect,
since validation's currently broken.
2020-06-20 00:41:31 +01:00
Marnanel Thurman 298ef8cda0 rm remote_object_is_recorded() from bowler's test suite; it would only have worked with the old models 2020-06-20 00:40:23 +01:00
Marnanel Thurman 539d19f651 Fix field names in create_local_note 2020-06-17 19:05:46 +01:00
Marnanel Thurman f8f1a7502f bowler's test_update reduced to a stub because we're not
officially supporting it in the next release.

test_delete created as a similar stub.
2020-06-17 19:04:26 +01:00
Marnanel Thurman ddb797b3a7 bowler's test_send_to_inbox skipped in its entirety;
we should support this, but not in v1.0.

MIME type constant for the above fixed, for completeness.
2020-06-15 22:16:07 +01:00
Marnanel Thurman 08f1a40ee3 Fix up bowler's outbox view so that it produces the index and page pages
of OrderedCollection appropriately. Still lots to do in that file.
2020-06-14 22:15:34 +01:00
Marnanel Thurman 5f37321d4f Rm serializers for collection index and pages, because we're not doing them via serializers
(since they don't represent specific objects)
2020-06-14 22:14:57 +01:00
Marnanel Thurman f42cb311c9 Using the same MIME type everywhere for now.
Fix typo which broke the build.
2020-06-14 22:13:19 +01:00
Marnanel Thurman b3c7611474 Remove ThingView and (for now) ActorView. InboxView and OutboxView
don't get told their listnames (because they know what they are already).
2020-06-14 22:12:43 +01:00
Marnanel Thurman 625d8299af First pass ordered collection serialisers. Not yet used. 2020-06-13 18:27:21 +01:00
Marnanel Thurman 6220a303d5 simple first pass at bowler's serializers 2020-06-12 17:44:47 +01:00
Marnanel Thurman d9230e6516 simple first pass at bowler's serializers 2020-06-12 17:43:43 +01:00
Marnanel Thurman 9c7c41312b StatusCreateSerializer renamed to CreateActivitySerializer
because it looked like it was a serializer to create statuses.

First start on fixing bowler's views to use serializers
rather than custom JSON rendering.

Added bowler_pub.renderers.
2020-06-12 17:12:30 +01:00
Marnanel Thurman c29c1a8c7b Simpler MIME_TYPE used in test 2020-06-12 17:09:14 +01:00
Marnanel Thurman 575cb0df17 Fixing up ActivityPub access to collections, and particularly to outboxes.
Partial checkin.
2020-06-11 19:07:55 +01:00
Marnanel Thurman f0b7249770 create_local_person in tests creates a LocalPerson, not a Person 2020-06-11 19:07:25 +01:00
Marnanel Thurman 6cd38e7a51 Basic version of LocalPerson.inbox. Not yet fully tested. 2020-06-06 21:29:47 +01:00