Wykres commitów

453 Commity (e23d18a2f3197786aadb3310097fe78d225c6e14)

Autor SHA1 Wiadomość Data
Marnanel Thurman e23d18a2f3 simplify assertion in test_unwrapped_object 2019-07-21 17:33:29 +01:00
Marnanel Thurman 98567b816c Creates which fail get deleted. 2019-07-21 17:26:09 +01:00
Marnanel Thurman 5ed943d1a0 test_create_doesnt_work_on_activities written. Currently fails. 2019-07-21 17:17:18 +01:00
Marnanel Thurman 05e4d0ccf6 IncomingMessage.fields memoised 2019-07-21 16:55:15 +01:00
Marnanel Thurman 09348f663c add 'testserver' to ALLOWED_HOSTS 2019-07-21 16:54:56 +01:00
Marnanel Thurman b4f4a164cf Test for posting non-activities to outbox. Currently fails. 2019-07-20 23:35:52 +01:00
Marnanel Thurman 5c5a9b7017 Tests for posting to outbox with incorrect IDs both local and remote.
They pass.
2019-07-20 23:26:46 +01:00
Marnanel Thurman 806706825b rm debug message 2019-07-20 23:26:01 +01:00
Marnanel Thurman 1ce0ee1df2 Interloper tests for Create activities, which both currently fail 2019-07-19 22:46:47 +01:00
Marnanel Thurman 6b4baeb2ea Test for unsigned messages into outbox passes 2019-07-19 22:17:47 +01:00
Marnanel Thurman 7ed917764e Create test in outbox passes 2019-07-19 22:13:48 +01:00
Marnanel Thurman 7b3c1125cd Local users for testing have a "preferredUsername" field 2019-07-19 22:12:56 +01:00
Marnanel Thurman 609be9b810 f_preferredUsername is stored in JSON 2019-07-19 22:12:39 +01:00
Marnanel Thurman 6c964dddd6 "key" is the whole string, not a dict containing it 2019-07-19 22:12:17 +01:00
Marnanel Thurman 01dc57338c rm serializers.py, which was left around from un_chapeau 2019-07-18 14:32:26 +01:00
Marnanel Thurman 0e19b00f38 Tests for the outbox view. Rough initial version. 2019-07-18 14:31:57 +01:00
Marnanel Thurman 368814cd9c Migration to add f_ prefixes in Actor. Should have been in 8aa62d5a. 2019-07-18 14:31:06 +01:00
Marnanel Thurman 5a02c8c93f Outbox passes is_local_user to validate. Debug messages cleaned up a bit. 2019-07-18 14:29:31 +01:00
Marnanel Thurman 13a3f47d42 Lots of checks on objects created by "Create" 2019-07-18 14:28:51 +01:00
Marnanel Thurman 8aa62d5abd Fields unique to Actor have the "f_" prefix if they're fields of the Thing.
For example, publicKey becomes f_publicKey. This allows polymorphic subscripting.

Also, cleaned up some of the code from before we introduced polymorphism.
2019-07-18 14:27:21 +01:00
Marnanel Thurman c57db91ce1 Removing some debug messages which were duplicated elsewhere. 2019-07-18 14:26:02 +01:00
Marnanel Thurman eb6408badf missing logging parameter 2019-07-18 14:25:10 +01:00
Marnanel Thurman a5eba85fea Rename validate()'s "is_local" to "is_local_user", and store it in the model.
This is because "is_local" is ambiguous; was the message received
locally (not over the network), or was the user a local user?
2019-07-18 14:23:43 +01:00
Marnanel Thurman bf0c673a79 stub OutboxView 2019-07-18 12:16:44 +01:00
Marnanel Thurman f65a6d4b08 validate() sets up the task and calls it.
It isn't itself the task, as before.
2019-07-18 12:16:02 +01:00
Marnanel Thurman 18565c6afe Huge checkin: central project "kepi" to use the "django_kepi" library.
This has shown up some bugs. Checking in the fixes for them too.
2019-07-11 18:25:06 +01:00
Marnanel Thurman c59228c58f Remove ActorView. Use ThingView instead.
ActorView was based on a (very) old design where Actors were
special-cased.
2019-07-11 17:40:12 +01:00
Marnanel Thurman b6697c81c6 Attempting to get the visibility tests passing. Not there yet. 2019-07-11 17:24:22 +01:00
Marnanel Thurman 11b187c71f "preferredUsername" is now held in Actor as a field.
Actor can figure out standard paths for local users.
Constants for these added to test_settings.
2019-07-11 17:23:19 +01:00
Marnanel Thurman 67788b7907 test_as_reply passes 2019-07-09 16:37:09 +01:00
Marnanel Thurman b687ebfe5a "thread" is a property of Item, not its superclass 2019-07-09 16:15:54 +01:00
Marnanel Thurman 4638315d8d None of the Create tests throw an exception (but not all of them pass) 2019-07-09 16:03:04 +01:00
Marnanel Thurman 6c4d29523e Continued fixup of the create tests to send Creates. Partial checkin. 2019-07-09 11:05:24 +01:00
Marnanel Thurman 6b62ee8057 "mentions" property 2019-07-09 11:04:55 +01:00
Marnanel Thurman 08a1de4857 save() when creating mentions 2019-07-09 11:04:30 +01:00
Marnanel Thurman f1c5b28282 Mention uses a CharField for the href, because we might not know them.
Actor.by_id() removed, since it's just find_local().
2019-07-09 11:04:00 +01:00
Marnanel Thurman cda0e7d76b Tags without href don't cause an exception 2019-07-09 10:36:25 +01:00
Marnanel Thurman 21a872ddf4 fix multiple breakage in Thing.__getitem__ 2019-07-09 10:24:11 +01:00
Marnanel Thurman 3ab67f5d33 "Create" tests should create Creates! Partial checkin. 2019-07-09 01:48:42 +01:00
Marnanel Thurman e3ac0b6622 activity_form updated to expect the new Thing format.
Lots of double-dereference json errors fixed.
2019-07-09 00:45:49 +01:00
Marnanel Thurman 59d76c5cf1 f_attributedTo added to item 2019-07-09 00:45:17 +01:00
Marnanel Thurman a6c6576185 Tidying 2019-07-09 00:44:52 +01:00
Marnanel Thurman b574ca93c5 remove TYPES array which was replaced by types.py 2019-07-09 00:06:16 +01:00
Marnanel Thurman 1698ccc357 find() creates Things marked as remote, rather than some weird
half-arsed replacement of its own.

python-mimeparse added to the requirements because fetch() needs it.
2019-07-05 17:26:21 +01:00
Marnanel Thurman 962e85c0f8 "is_local" param of create() replaces vague "sender" param.
Tests for particular fields by Thing type removed, pending
replacement with cleverer system from d_k/things.py.

Class imports for create() done in the importing code
rather than at the top of the file, which leaves a mess.
2019-07-05 17:23:50 +01:00
Marnanel Thurman d80a241b5d Added mention tracking. 2019-07-05 17:21:01 +01:00
Marnanel Thurman 6adddb39c3 Thing getitem/setitem honours Audiences 2019-07-03 21:01:45 +01:00
Marnanel Thurman 1450667b9a rm repetition 2019-07-03 21:01:33 +01:00
Marnanel Thurman 52b3491e66 Export AUDIENCE_FIELD_NAMES 2019-07-03 21:00:36 +01:00
Marnanel Thurman 44aeab91d1 Don't json-encode values twice.
_normalise_type_for_thing moved from create to Thing.
create doesn't worry about what kind of fields it's asking Thing to set.
Thing's setitem adds audiences correctly, though
  this requires it to save() as a side-effect
  if this is the first creation.
2019-07-03 12:59:21 +01:00