Marnanel Thurman
14358daa0a
Default images
2019-08-14 00:30:54 +01:00
Marnanel Thurman
ff0c646775
fleshed out actor's activity_form
2019-08-14 00:30:24 +01:00
Marnanel Thurman
062276d0b4
include @context
2019-08-14 00:29:52 +01:00
Marnanel Thurman
f2bbfd0f5f
STATIC_ROOT in settings
2019-08-14 00:29:40 +01:00
Marnanel Thurman
40b70a18e1
skip some half-written tests based on Mastodon tests
2019-08-13 21:00:31 +01:00
Marnanel Thurman
3d04867218
test_send_to_inbox passes!
...
Objects passed in via Create have to have ids.
2019-08-13 20:45:56 +01:00
Marnanel Thurman
275cc8c654
test_activity passes!
2019-08-13 20:23:50 +01:00
Marnanel Thurman
d74d75f784
"id" can't differ from "remote_url".
2019-08-13 20:22:00 +01:00
Marnanel Thurman
9f8e1ef495
Fixed erroneous parameter name which caused remote Creates to create local objects
2019-08-13 20:21:17 +01:00
Marnanel Thurman
da00c323f4
test_deliver passes!
2019-08-13 19:24:11 +01:00
Marnanel Thurman
05ca9cdf06
altair.example.com -> testserver throughout; otherwise we're just causing confusion
2019-08-13 19:23:43 +01:00
Marnanel Thurman
e946b90f9b
Remote Collections don't result in the creation of new objects in our database;
...
instead, find() returns them as a subclass of dict.
2019-08-13 19:22:56 +01:00
Marnanel Thurman
1f37e1c654
test_find: the local server is "testserver"
2019-08-12 23:54:36 +01:00
Marnanel Thurman
a1c7796b27
I think I was confused about Python syntax there
2019-08-12 23:53:08 +01:00
Marnanel Thurman
bc564656b2
validation: remove unused fields from IncomingMessage.
...
Also some logging.
2019-08-12 23:49:48 +01:00
Marnanel Thurman
a3a97fb089
tests/__init__: don't double-encode "body" because it's already JSON
2019-08-12 23:49:16 +01:00
Marnanel Thurman
2be7700649
is_it_relevant(): Anything other than strings and bytes will be
...
iterated over. List members which are Audiences will be dereferenced.
2019-08-12 23:46:57 +01:00
Marnanel Thurman
f57421b91b
"Create" objects whose "object" points outside the cache don't crash.
...
Relatedly, the __obj suffix for the argument of Object.__getitem__
now allows retrieval of anything we don't have to fetch.
It used to be restricted to local objects.
2019-08-12 23:45:23 +01:00
Marnanel Thurman
2878e0b731
The special case of activity_form for Create is now in Create rather than its parent.
2019-08-12 19:45:35 +01:00
Marnanel Thurman
cb551f50d9
test_validation largely rewritten so it uses httpretty. It passes.
2019-08-12 19:44:43 +01:00
Marnanel Thurman
d482f50e78
@context is now a simple string.
...
Added remote_object_is_recorded().
Added the on_fetch param to mock_remote_object()
and create_remote_person().
2019-08-12 19:42:23 +01:00
Marnanel Thurman
d49ca4b14f
Defensive programming in validation.py.
...
Also, workaround for httpsig.utils.CaseInsensitiveDict not
reimplenting get()...!
2019-08-12 19:40:19 +01:00
Marnanel Thurman
f69c33e6c9
object['remote_url'] can be set and got.
2019-08-12 19:39:42 +01:00
Marnanel Thurman
0711c49b78
If we have no public key, actor['publicKey'] returns None instead of falling over.
...
Added more logging.
Removed ['wombat']=1, for goodness' sake.
2019-08-12 19:38:32 +01:00
Marnanel Thurman
38c3b51eb3
find() now takes a "run_delivery" param which is passed into the same param in create().
...
Also we don't decorate field names with "f_" any more when we pass them into create().
2019-08-12 19:35:56 +01:00
Marnanel Thurman
1f87fb4492
Refactor create(). It could be more efficient, but let's look at that later.
2019-08-12 19:31:38 +01:00
Marnanel Thurman
d65b43e3a9
Lists which don't exist, but default to empty, get created on first write.
...
test_read_from_outbox passes again.
2019-08-11 23:30:49 +01:00
Marnanel Thurman
eaa8de0771
rm unwritten test in the wrong language
2019-08-11 19:48:03 +01:00
Marnanel Thurman
eef4405280
tests.mastodon.test_create passes!
...
Public collection IDs are now exported from d_k.__init__ as a set.
user['following'] etc are returned as URLs, not paths.
side_effects.create() goes to some trouble to check whether a new object is relevant to us,
and rejects it if it isn't.
2019-08-11 19:44:49 +01:00
Marnanel Thurman
1d6f17684d
test_collection passes
2019-08-11 16:31:44 +01:00
Marnanel Thurman
50a63a493a
restore POST handler in KepiView
...
We previously had a POST handler in one of the subclasses which
should have been in KepiView itself. Later, this POST handler
got adapted into an ACTIVITY_STORE handler. But it should have been
split between ACTIVITY_STORE and POST, so the POST parts are now
reinstated.
2019-08-10 23:57:35 +01:00
Marnanel Thurman
c4c65e9801
Delivery to shared inbox works.
...
test_collection passes!
Collection views uses "username" as a key in logging, not "name" (which was phased out a month ago)
test_collection uses "testserver" as the name of the test server.
2019-08-10 20:22:08 +01:00
Marnanel Thurman
ea74909726
Side effect for "Follow" uses the new class methods in Following
2019-08-10 20:21:27 +01:00
Marnanel Thurman
590d74d0df
create() refuses to create types which don't exist
2019-08-10 18:58:49 +01:00
Marnanel Thurman
e91b42bad1
test_find asserts dict is subset rather than equal, and
...
doesn't double-encode JSON. Now passes.
2019-08-10 17:45:15 +01:00
Marnanel Thurman
b662b5a4a5
Use django.utils.timezone.now() instead of datetime.datetime.now()
...
This was the cause of the runtime warning in the tests.
2019-08-10 17:44:41 +01:00
Marnanel Thurman
158da34d1e
tests_send_to_outbox passes again
2019-08-10 17:29:48 +01:00
Marnanel Thurman
b096eb41b5
Thing.run_side_effects() returns whether the object should be deleted,
...
rather than trying to delete it itself.
create() deletes the new instance accordingly.
2019-08-10 17:28:31 +01:00
Marnanel Thurman
8db22b7f88
Actor.f_publicKey and .privateKey are JSON, so we need to dump/load them in the accessors.
2019-08-10 17:27:41 +01:00
Marnanel Thurman
36b3e8f0a7
test_views passes again.
2019-08-10 17:03:47 +01:00
Marnanel Thurman
8faa494ed6
Anything with a "former_type" is deemed to be a Tombstone.
...
This is instead of changing f_type, which has far too many knock-on
effects now that we're using polymorphism.
Tombstones have active=False.
AllUsersView updated so that it uses the polymorphic types.
2019-08-10 17:02:11 +01:00
Marnanel Thurman
712c57730b
If publicKey or privateKey are not in the kwargs for create_local_person,
...
then we load keys from tests/keys rather than expecting django_kepi to
generate new keys for us.
2019-08-10 17:01:08 +01:00
Marnanel Thurman
e29d083a37
formatting of values in settings.KEPI made consistent throughout
2019-08-10 16:22:36 +01:00
Marnanel Thurman
2d7411e574
Removed now we're not just a library
2019-08-10 16:22:16 +01:00
Marnanel Thurman
625caf2bb4
Actors use the actor URL format, not the general object URL format
2019-08-09 17:54:59 +01:00
Marnanel Thurman
1003350e85
__str__ on Actor
2019-08-09 17:51:59 +01:00
Marnanel Thurman
a062e3740c
Renaming "f_privateKey" in Actor to "privateKey"; it's not a field in the ActivityPub sense.
2019-08-09 17:45:10 +01:00
Marnanel Thurman
edd67acf9a
Rethinking admin forms; much reworking still to come
2019-08-09 17:42:01 +01:00
Marnanel Thurman
ef48ef2bc3
host-meta.xml template; should have been checked in earlier
2019-08-09 17:06:58 +01:00
Marnanel Thurman
a2f5e03ab0
Webfinger, plus tests
2019-08-09 17:06:44 +01:00