kopia lustrzana https://gitlab.com/marnanel/chapeau
test_create's as_reply_to test passes. Lots still to do here.
rodzic
d77a43befd
commit
489fd453e0
|
@ -7,6 +7,7 @@ import kepi.trilby_api.models as trilby_models
|
||||||
|
|
||||||
REMOTE_ALICE = 'https://somewhere.example.com/users/alice'
|
REMOTE_ALICE = 'https://somewhere.example.com/users/alice'
|
||||||
LOCAL_FRED = 'https://testserver/users/fred'
|
LOCAL_FRED = 'https://testserver/users/fred'
|
||||||
|
LOCAL_STATUS_ID = 'https://testserver/status/this-is-an-id'
|
||||||
|
|
||||||
logger = logging.getLogger(name='kepi')
|
logger = logging.getLogger(name='kepi')
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ class TestCreate(TestCase):
|
||||||
sender = self._fred.url
|
sender = self._fred.url
|
||||||
|
|
||||||
create_form = {
|
create_form = {
|
||||||
|
'id': LOCAL_STATUS_ID,
|
||||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||||
'type': 'Create',
|
'type': 'Create',
|
||||||
'actor': sender,
|
'actor': sender,
|
||||||
|
@ -228,7 +230,7 @@ class TestCreate(TestCase):
|
||||||
object_form = {
|
object_form = {
|
||||||
'type': 'Note',
|
'type': 'Note',
|
||||||
'content': 'Lorem ipsum',
|
'content': 'Lorem ipsum',
|
||||||
'inReplyTo': original_status.id,
|
'inReplyTo': original_status.url,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._send_create_for_object(object_form)
|
self._send_create_for_object(object_form)
|
||||||
|
@ -239,9 +241,9 @@ class TestCreate(TestCase):
|
||||||
msg = 'it creates status',
|
msg = 'it creates status',
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertIn(
|
||||||
status.thread,
|
|
||||||
original_status,
|
original_status,
|
||||||
|
status.thread,
|
||||||
msg = 'status is in the thread',
|
msg = 'status is in the thread',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -253,7 +255,7 @@ class TestCreate(TestCase):
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
status.in_reply_to_account_id,
|
status.in_reply_to_account_id,
|
||||||
original_status.account,
|
original_status.account.id,
|
||||||
msg = 'status is a reply to the correct account',
|
msg = 'status is a reply to the correct account',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue