Wykres commitów

998 Commity (trilby-heavy)

Autor SHA1 Wiadomość Data
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
Marnanel Thurman e373fa656d Add "language", "default_visibility", and "default_sensitive" to LocalPerson.
Move the help-text for visibility to kepi.trilby_api.utils to save
duplicating it between LocalPerson and Status.

Fixes inability to serialise "source" property for accounts in trilby.
2020-06-03 18:16:22 +01:00
Marnanel Thurman 69fb4ef617 test_deliver in sombrero removed, bc it was against the old bowler API 2020-05-28 22:41:07 +01:00
Marnanel Thurman 04baf1d4fa More fields added to RemotePerson to bring it into line with LocalPerson.
Not all of them get filled in yet.
2020-05-25 17:12:40 +01:00
Marnanel Thurman fcdc7b69c5 Don't register httpretty hosts in setUp, because httpretty.enable resets the list! 2020-05-25 17:11:48 +01:00
Marnanel Thurman 8dedc78b80 rm test print 2020-05-25 17:11:32 +01:00
Marnanel Thurman eaa3461ccc A few more fields filled in for RemotePerson when we fetch their activitypub serialisation from another server. 2020-05-25 17:11:01 +01:00
Marnanel Thurman 0f61676a7f If we attempt to deliver a message, but we can't connect to the host,
log that but otherwise ignore it.
2020-05-25 17:09:39 +01:00
Marnanel Thurman 0f238027c6 Various parts of sombrero modified to use the new polymorphic models in trilby 2020-05-17 22:06:21 +01:00
Marnanel Thurman c482e4361d Sombrero's fetch_user allows usernames in "user@host" style as well as URLs. 2020-05-17 22:01:55 +01:00
Marnanel Thurman 83c7f511b5 trilby's RemotePerson's __str__() never returns None now! (Whoops.) 2020-05-17 22:01:16 +01:00
Marnanel Thurman 866f3db5cc fixed filename in source header 2020-05-16 21:50:25 +01:00