minor noop tweaks: dupe test, test name, docstring

pull/464/head
Ryan Barrett 2023-03-27 14:18:24 -07:00
rodzic 68de408789
commit 754a6eb651
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 2 dodań i 13 usunięć

Wyświetl plik

@ -74,7 +74,7 @@ class ActivityPub(Protocol):
Mastodon requires this signature if AUTHORIZED_FETCH aka secure mode is on:
https://docs.joinmastodon.org/admin/config/#authorized_fetch
Signs the request with the given user. If not provided, defaults to
Signs the request with the current user's key. If not provided, defaults to
using @snarfed.org@snarfed.org's key.
Args:

Wyświetl plik

@ -906,7 +906,7 @@ class ActivityPubTest(testutil.TestCase):
self.assertEqual('inactive', followee.key.get().status)
self.assertEqual('active', other.key.get().status)
def test_delete_actor_not_stored(self, _, mock_get, ___):
def test_delete_actor_not_fetchable(self, _, mock_get, ___):
self.key_id_obj.delete()
Protocol.get_object.cache.clear()
@ -914,17 +914,6 @@ class ActivityPubTest(testutil.TestCase):
got = self.post('/inbox', json={**DELETE, 'object': 'http://my/key/id'})
self.assertEqual(202, got.status_code)
def test_delete_actor_object_not_stored(self, _, mock_get, ___):
self.key_id_obj.delete()
Protocol.get_object.cache.clear()
mock_get.return_value = requests_response(status=410)
got = self.post('/inbox', json={
**DELETE,
'object': {'id': 'http://my/key/id'},
})
self.assertEqual(202, got.status_code)
def test_delete_note(self, _, mock_get, ___):
obj = Object(id='http://an/obj', as2={})
obj.put()