kopia lustrzana https://gitlab.com/marnanel/chapeau
test_specific_post actually has assertions in it (oops)
Test user for test_specific_post has auto_follow=False so we don't create extra Activities.2019-08-17
rodzic
d0786af451
commit
f71e8f0382
|
@ -1,6 +1,6 @@
|
||||||
from django.test import TestCase, Client
|
from django.test import TestCase, Client
|
||||||
from django_kepi.views import InboxView
|
from django_kepi.views import InboxView
|
||||||
from django_kepi.models import Thing, create
|
from django_kepi.models import Thing, create, Following
|
||||||
from django_kepi.validation import IncomingMessage
|
from django_kepi.validation import IncomingMessage
|
||||||
from unittest import skip
|
from unittest import skip
|
||||||
from . import *
|
from . import *
|
||||||
|
@ -21,6 +21,7 @@ class TestInbox(TestCase):
|
||||||
|
|
||||||
alice = create_person(
|
alice = create_person(
|
||||||
name='alice',
|
name='alice',
|
||||||
|
auto_follow=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
mock_remote_object(REMOTE_FRED,
|
mock_remote_object(REMOTE_FRED,
|
||||||
|
@ -43,6 +44,14 @@ class TestInbox(TestCase):
|
||||||
f_object = LOCAL_ALICE,
|
f_object = LOCAL_ALICE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.assertIs(
|
||||||
|
len(Following.objects.filter(
|
||||||
|
follower = REMOTE_FRED,
|
||||||
|
following = LOCAL_ALICE,
|
||||||
|
)),
|
||||||
|
1,
|
||||||
|
msg="sending Follow did not result in following")
|
||||||
|
|
||||||
@httpretty.activate
|
@httpretty.activate
|
||||||
def test_shared_post(self):
|
def test_shared_post(self):
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue