Wykres commitów

241 Commity (d482f50e789cc392140a1fdff14b872bfd565122)

Autor SHA1 Wiadomość Data
Marnanel Thurman 696192daaa CachedPublicKey renamed to CachedRemoteUser; its pk is the owner URL
and it gains the "inbox" and "outbox" user URLs.
2019-04-18 19:32:55 +01:00
Marnanel Thurman aab84445da rm extraneous comma 2019-04-18 19:26:32 +01:00
Marnanel Thurman 320624129c Tests for django_kepi.tasks. All passed. 2019-04-14 20:52:47 +01:00
Marnanel Thurman 9ae34685e2 test_asyncresult -> test_tasks. Still updating this. 2019-04-14 19:27:59 +01:00
Marnanel Thurman cb08c6c7db Every module initialises its own logger. 2019-04-14 19:18:16 +01:00
Marnanel Thurman c7564aabd6 First steps on getting test_inbox to pass.
IncomingMessage.waiting_for can be null.
d_k.views creates its own logger.
2019-04-10 20:43:37 +01:00
Marnanel Thurman bbe19a8d77 Restoring old tests I deleted, inadvisably. 2019-04-10 20:35:16 +01:00
Marnanel Thurman fb4bbe2c49 "actor" and "key_id" are now properties of CachedPublicKey, rather than methods. 2019-04-10 20:10:46 +01:00
Marnanel Thurman 6336eac2b2 Removed Quarantined* and CachedText because they duplicate what kepi.validation does.
Also removed their tests.
2019-04-10 20:09:20 +01:00
Marnanel Thurman 35be80864c Tests for incoming initial message validation all written and passing.
Still need to write tests for validation of incoming messages where
the key has had to be fetched by a batch process.
2019-04-10 17:41:46 +01:00
Marnanel Thurman df491d602f Validation tests for local actor and remote actor 2019-04-10 06:35:16 +01:00
Marnanel Thurman 988b27f9f0 Generate test messages for validation, instead of supplying literals 2019-04-09 20:23:29 +01:00
Marnanel Thurman ca6acca571 Public/private key pairs for testing.
(These are taken from the alicebobcarol.json fixture in un_chapeau.)
2019-04-08 20:52:52 +01:00
Marnanel Thurman 2303ac635d mock cached key lookup 2019-04-08 19:48:06 +01:00
Marnanel Thurman 4aefc6c51c add background task mock 2019-04-08 19:21:23 +01:00
Marnanel Thurman 0e7c89a03a Bringing the new validation system into models. Many more tests needed. 2019-04-07 21:39:11 +01:00
Marnanel Thurman 528551ca37 Test to verify headers. (Not actually a proper test yet.) 2019-04-06 21:57:14 +01:00
Marnanel Thurman da353f95ec test note 2019-04-06 21:56:50 +01:00
Marnanel Thurman dbaf53915d rm out of date test 2019-03-04 08:01:35 +00:00
Marnanel Thurman ee12bd6880 intermediate 2019-03-03 21:30:18 +00:00
Marnanel Thurman c9a4df27c9 rm old tests 2019-03-03 21:13:00 +00:00
Marnanel Thurman 0d59ebbc58 The contents of a CachedText can be None by default. Tests added. 2019-02-16 20:24:43 +00:00
Marnanel Thurman 27b64f8e4e CachedText model added, with simple test 2019-02-16 20:05:14 +00:00
Marnanel Thurman 63a6d16eed Tests for the "something" model (which has a daft name, which should be changed). 2018-10-29 14:28:13 +00:00
Marnanel Thurman f00b74b988 New approach to caching remote objects 2018-10-29 13:35:18 +00:00
Marnanel Thurman e6953e329d Renamed methods to avoid confusion.
activity is now activity_form.
find_activity is now activity_find.

django_kepi.resolve is now django_kepi.find.
2018-10-12 21:47:18 +01:00
Marnanel Thurman 554766326b Activate httpretty and it all works. I feel a bit of a fool. 2018-10-12 20:13:59 +01:00
Marnanel Thurman 1e61103353 Don't test whether a remote article has been loaded for a Like that failed;
it causes weird race conditions. If the article itself is valid,
it should stay.
2018-10-12 18:20:18 +01:00
Marnanel Thurman 800dcaaf88 abolishing NeedToFetchException because it messes up debugging 2018-10-12 17:45:44 +01:00
Marnanel Thurman b81d6c7107 Using central logger. 2018-10-12 16:32:40 +01:00
Marnanel Thurman 2899e20188 Malformed JSON check doesn't attempt to build the JSON string itself.
Using central logger.

Added silly hack for testing state issues.
2018-10-12 16:31:47 +01:00
Marnanel Thurman 412799fc2f Nudging httpretty to allow Celery to callback is moved to __init__.py.
That is possibly the most techie sentence I've ever written.

Using central logger.

Success codes changed to 0 and 1 instead of False and True.
2018-10-12 16:29:46 +01:00
Marnanel Thurman 73f8032791 wild amounts of tinkering to make the tests use httpretty 2018-10-10 21:28:41 +01:00
Marnanel Thurman a87298b9ed rm outdated comment 2018-10-09 16:59:23 +01:00
Marnanel Thurman cfe269f72c intermediate 2018-10-05 00:12:03 +01:00
Marnanel Thurman 3841a009f9 intermediate 2018-10-03 22:43:42 +01:00
Marnanel Thurman 0f840e5c12 Testing for asyncresult 2018-10-03 20:53:45 +01:00
Marnanel Thurman 7b5408ed4c Sort out model identifiers in things_for_testing 2018-09-27 17:53:25 +01:00
Marnanel Thurman 937bc04651 Test for "all known" tests for Activity creation as well as QM deletion 2018-09-27 17:36:12 +01:00
Marnanel Thurman e58a303589 Test that messages where all parts are known go through immediately. Also, url_identifier() -> activity_id in ThingArticle for regularity. 2018-09-27 16:52:29 +01:00
Marnanel Thurman 20ff4d636d Tests for non-json messages 2018-09-27 16:38:41 +01:00
Marnanel Thurman daa5543916 rm outdated comment 2018-09-27 13:50:26 +01:00
Marnanel Thurman 8717b59a97 Attempts to create "Like" activities, not "Article"s (which aren't Activitys) 2018-09-23 21:58:38 +01:00
Marnanel Thurman fd991062f3 After creating a Follow, also create an Accept for it 2018-09-18 23:12:13 +01:00
Marnanel Thurman 22cf60d524 add user to test, to avoid NeedToFetch 2018-09-16 21:49:08 +01:00
Marnanel Thurman 2b29a8e8e2 Removed all the old Cobject stuff, at last. This confused
makemigrations so much that I killed all the existing migrations
and started again.

Activity fields representing key+value pairs all begin with "f_"
because it was getting confusing when only some of them did.

Activity.deserialize() renamed Activity.create().

The tests don't all pass at present, but they will soon.
2018-09-16 21:42:27 +01:00
Marnanel Thurman 5bb3dad40d Many new tests 2018-09-12 23:49:25 +01:00
Marnanel Thurman 140dfe795f Activity.deserialize() correctly accesses its list of types.
First test for it (which found the above bug).
2018-09-12 02:50:08 +01:00
Marnanel Thurman 8c3d13ed46 New design for Activity, since we need to deserialise everything in the same place.
NeedToFetchException added.

rm mistaken params in TombstoneException's call to superclass's constructor.

URL_FORMAT -> ACTIVITY_URL_FORMAT for clarity.

rm tests for old code which is going away soon.
2018-09-10 13:56:31 +01:00
Marnanel Thurman 54d6a049b3 Tests for resolver 2018-09-07 14:55:07 +01:00
Marnanel Thurman 553c3d8d3d Okay, the NamedObject table was a mistake. Let's use the existing registration system. 2018-09-06 23:01:18 +01:00
Marnanel Thurman 928934eab2 First steps with the resolver 2018-09-06 20:00:39 +01:00
Marnanel Thurman 5b98d22c42 test_collection_with_overridden_transform() 2018-09-06 18:53:18 +01:00
Marnanel Thurman c066ff7e80 test_tombstone_collection_response() added
CollectionResponse correctly uses x.activity instead of str(x)

CollectionResponse handles TombstoneException correctly
2018-09-06 18:47:24 +01:00
Marnanel Thurman 45e8772430 test_collection_response_spills() 2018-09-06 18:26:11 +01:00
Marnanel Thurman 852b57ddce test contents of page 1 in collection response 2018-09-06 17:18:21 +01:00
Marnanel Thurman 59fe9d4372 test_collection_response, for index pages. Content pages to follow'. 2018-09-06 16:09:32 +01:00
Marnanel Thurman ce4ccf95ca test_tombstone_object_response. Also, checked response status code in test_object_response. 2018-09-06 15:47:36 +01:00
Marnanel Thurman f750b8e9a0 test_empty_response, test_object_response 2018-09-06 15:40:46 +01:00
Marnanel Thurman 7778f0a512 test_tombstone_exception 2018-09-06 15:30:26 +01:00
Marnanel Thurman 84c5afb403 intermediate 2018-09-05 23:11:18 +01:00
Marnanel Thurman 3da527d639 intermediate 2018-09-05 23:09:11 +01:00
Marnanel Thurman 27c218e42b Check both following and followed views 2018-09-01 22:54:51 +01:00
Marnanel Thurman 514f5ecadf Tests for FollowersView (they pass) 2018-09-01 18:19:48 +01:00
Marnanel Thurman 81a27fb853 ActivityObjectView delegates to its subclass for content via objectDetails().
Actor has a string representation.

FollowersView removed for now, because testing it is too fiddly
(it's not obvious how to construct the URL for the test client
now that we're using URLs as identifiers). It may be back later.

Version number bump.
2018-08-31 17:55:57 +01:00
Marnanel Thurman dd8daa7f66 Added tests to ensure that other apps can make to our data.
Reworked Actor: the only thing we know about an Actor is their URL.
Removed tests for Followers collections because it's hard to test
without subclassing the view. I may put it back in later.
2018-08-30 00:59:38 +01:00
Marnanel Thurman 61a3c2e020 Collection tests pass 2018-08-27 19:06:39 +01:00
Marnanel Thurman c04a83e442 intermediate 2018-08-27 18:53:52 +01:00
Marnanel Thurman e196010b82 OrderedCollectionPage tests fixed further 2018-08-26 22:44:56 +01:00
Marnanel Thurman 1c33a052c5 Tests now work with paging correctly 2018-08-26 22:21:09 +01:00
Marnanel Thurman 031826dd93 tests check for page contents correctly, but don't yet account for multiple pages 2018-08-26 21:16:04 +01:00
Marnanel Thurman f31caf1264 intermediate 2018-08-26 20:07:27 +01:00
Marnanel Thurman d7dfbee52d can test followers collection up to 100 2018-08-26 19:35:08 +01:00
Marnanel Thurman 9157c2f215 intermediate 2018-08-26 19:27:45 +01:00
Marnanel Thurman dbf8f149c0 intermediate 2018-08-25 00:04:08 +01:00
Marnanel Thurman d3e90ec4c7 intermediate 2018-08-24 19:29:35 +01:00
Marnanel Thurman cacb67345e Starting to get the tests in order 2018-08-20 20:14:49 +01:00
Marnanel Thurman 8fb9844a92 intermediate 2018-08-20 16:08:06 +01:00
Marnanel Thurman 8e9b36696a actually let's just not bother with Register 2018-08-20 00:10:19 +01:00
Marnanel Thurman e1a3aca719 intermediate 2018-08-19 21:47:54 +01:00
Marnanel Thurman 368434fd89 renamed activity_fields() to serialize() throughout. rm old call to register_type which no longer exists 2018-08-19 16:49:48 +01:00
Marnanel Thurman be18932ca3 intermediate 2018-08-19 04:11:44 +01:00
Marnanel Thurman 737e58d6cd Rewrite of much of django_kepi/models.py to use GenericForeignKeys.
Unfortunately, now the tests break...
2018-08-18 20:21:39 +01:00
Marnanel Thurman 1c09eb1d5d one-to-one links from ActivityObject 2018-08-12 14:06:26 +01:00
Marnanel Thurman 8a8359c88b tests actually pass 2018-08-11 23:36:59 +01:00
Marnanel Thurman d2ff356683 I have now raised that bug: https://code.djangoproject.com/ticket/29662 2018-08-11 21:52:07 +01:00
Marnanel Thurman 8e8a18c193 tests are somewhat closer to passing 2018-08-11 20:03:39 +01:00
Marnanel Thurman caeeceea5d further intermediate work 2018-08-11 17:21:56 +01:00
Marnanel Thurman 830d2d30e1 a very basic sketch 2018-08-11 17:01:54 +01:00
Marnanel Thurman 741c0469dd Move old tests into the tests/ directory, and create tests/__init__.py 2018-08-08 19:40:21 +01:00
Marnanel Thurman c0fff83e3f moved test_settings.py into tests/; added standard apps 2018-08-07 16:29:26 +01:00