Notifications Tests

class tests.notifications.factories.CommentNotificationFactory(**kwargs)[source]

Bases: NotificationFactory

type = 'comment'
class tests.notifications.factories.FollowNotificationFactory(**kwargs)[source]

Bases: NotificationFactory

type = 'follow'
class tests.notifications.factories.LikeNotificationFactory(**kwargs)[source]

Bases: NotificationFactory

type = 'like'
class tests.notifications.factories.NotificationFactory(**kwargs)[source]

Bases: DjangoModelFactory

post = <factory.declarations.SubFactory object>
receiver = <factory.declarations.SubFactory object>
sender = <factory.declarations.SubFactory object>
class tests.notifications.test_service.TestNotificationService(methodName='runTest')[source]

Bases: TestCase

Test notification service

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_create_notification()[source]
test_create_notification_with_same_sender_and_recever()[source]
class tests.notifications.test_views.TestNotificationAPIView(methodName='runTest')[source]

Bases: APITestCase

Test Notification api view

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_not_authorizated()[source]

Test not authorizated

test_resolve_url()[source]

Test resolve url

test_success()[source]
class tests.notifications.test_views.TestReadNotificationAPIView(methodName='runTest')[source]

Bases: APITestCase

Test Notification api view

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_not_authorizated()[source]

Test not authorizated

test_resolve_url()[source]

Test resolve url

test_success()[source]
class tests.notifications.test_serializer.TestGetNotificationSerializer(methodName='runTest')[source]

Bases: TestCase

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_data()[source]