tests Package

tests Package

models Module

class kawaz.core.publishments.tests.models.PublishmentTestArticle(id, pub_state, author, title)[ソース]

ベースクラス: django.db.models.base.Model

exception DoesNotExist

ベースクラス: django.core.exceptions.ObjectDoesNotExist

exception PublishmentTestArticle.MultipleObjectsReturned

ベースクラス: django.core.exceptions.MultipleObjectsReturned

PublishmentTestArticle.author

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

PublishmentTestArticle.author_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

PublishmentTestArticle.get_pub_state_display(*moreargs, **morekwargs)
PublishmentTestArticle.id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

PublishmentTestArticle.objects = <django.db.models.manager.Manager object>
PublishmentTestArticle.pub_state

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

PublishmentTestArticle.title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

test_lookups Module

test_perms Module

class kawaz.core.publishments.tests.test_perms.PublishmentPermissionLogicTestCase(methodName='runTest')[ソース]

ベースクラス: django.test.testcases.TestCase

setUp()[ソース]
test_view_permission_with_draft()[ソース]

Nobody except the author and adam can see the draft model

test_view_permission_with_protected()[ソース]

Authenticated user except wille can see the protected model

test_view_permission_with_public()[ソース]

Anyone can see the public model

test_view_permission_without_obj()[ソース]

Anyone have a potential to see the model