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
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
1f37e1c654
test_find: the local server is "testserver"
2019-08-12 23:54:36 +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
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
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
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
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
158da34d1e
tests_send_to_outbox passes again
2019-08-10 17:29:48 +01:00
Marnanel Thurman
36b3e8f0a7
test_views passes again.
2019-08-10 17:03:47 +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
a2f5e03ab0
Webfinger, plus tests
2019-08-09 17:06:44 +01:00
Marnanel Thurman
71e97f6554
Added view for host-meta, and a test for it, which passes.
...
Moved views.py into views/activitypub.py, so we can have a
separate file for the host-meta view. views/activitypub.py
should be split up further at some point.
2019-08-08 00:01:43 +01:00
Marnanel Thurman
b17af6f62b
Removing d_k/types.py and doing the whole thing via polymorphic models.
...
Model names are their ActivityPub types.
As a result, Thing is renamed to Object.
2019-08-05 15:26:40 +01:00
Marnanel Thurman
6c3e8edc55
remove old send_to_inbox test, and move send_to_inbox2 over it
2019-08-05 13:31:07 +01:00
Marnanel Thurman
82da292419
Ported the remaining tests from inbox to inbox2
2019-08-05 13:30:34 +01:00
Marnanel Thurman
3550a118b6
Extra fields in Thing go back into ThingFields,
...
rather than being stored in Thing.other_fields.
Long overdue.
2019-08-05 13:11:44 +01:00
Marnanel Thurman
0e298c1ac2
test_send_to_inbox2 has test_create and test_follow working at the same time :)
2019-08-04 22:56:05 +01:00
Marnanel Thurman
acf2ff5b04
Side-effects for "Follow" work properly now.
2019-08-04 22:44:53 +01:00
Marnanel Thurman
de9fd89190
Brought test_write_to_inbox2 more up to date; it now passes
2019-08-01 17:54:31 +01:00
Marnanel Thurman
dfbf912801
test_send_to_inbox2 doesn't attempt to GET as a test, because
...
there's no guarantee in the spec that it'll be visible
2019-08-01 16:34:07 +01:00
Marnanel Thurman
2dda098010
Added test_read_announce.
...
Modified checking to look for the correct types in the result,
for the non-empty tests.
Fix to test_read_empty calling a method with the wrong name!
2019-08-01 16:20:51 +01:00
Marnanel Thurman
a439768290
Debug logging added. Logger name changed to django_kepi like the package
2019-08-01 16:01:29 +01:00
Marnanel Thurman
edb2f0334a
_put_stuff_in_inbox renamed to _put_stuff_in_outbox (oops)
2019-07-31 19:52:04 +01:00
Marnanel Thurman
892ab39d9b
test_read_create, though it doesn't pass yet.
2019-07-31 19:51:08 +01:00
Marnanel Thurman
26cf459b9f
Use the new "value" param for create. Also, run_delivery=False.
2019-07-31 19:50:41 +01:00
Marnanel Thurman
50c4f2f6b7
test_read_from_outbox, initial
2019-07-31 19:11:04 +01:00
Marnanel Thurman
4882f76ec3
Rearranging inbox and outbox tests into "send to" and "read from".
2019-07-31 18:59:56 +01:00
Marnanel Thurman
229bbfae15
Public keys can be strings or dicts containing the string.
2019-07-30 19:18:34 +01:00
Marnanel Thurman
7e6f649b4f
test_outbox reads back from the outbox
2019-07-30 19:09:20 +01:00
Marnanel Thurman
df1b151d69
Created object gets reasonable 'to' field.
...
'to' and 'cc' get copied to Create activity.
2019-07-30 19:06:02 +01:00
Marnanel Thurman
8348be5f56
Added Collection model, and modified the collection views to display it.
...
Tests in test_inbox2 use it, but this is a work in progress.
2019-07-26 17:47:44 +01:00
Marnanel Thurman
579266b5fa
test_inbox2. Like test_inbox, but using the tools built for test_outbox.
...
When test_inbox2 is working, I'll merge it with test_inbox.
2019-07-25 17:18:09 +01:00
Marnanel Thurman
1b5a75b309
Fixed delete test for outbox to check with and without tombstones.
2019-07-22 18:00:41 +01:00
Marnanel Thurman
34b63787a8
Test for deletion; fails
2019-07-22 17:30:05 +01:00
Marnanel Thurman
32ee56b18e
Update to outbox doesn't work on objects you don't own
2019-07-21 18:43:54 +01:00
Marnanel Thurman
517ea268a4
Update activities to outbox work.
2019-07-21 18:38:50 +01:00
Marnanel Thurman
5691417a35
Test for Update activity sent to outbox. Fails.
2019-07-21 18:23:01 +01:00
Marnanel Thurman
0191a96c70
test_like in outbox. Also fix up checks in other tests.
2019-07-21 18:06:18 +01:00
Marnanel Thurman
e23d18a2f3
simplify assertion in test_unwrapped_object
2019-07-21 17:33:29 +01:00