本文整理汇总了Python中app.models.AnonymousUser方法的典型用法代码示例。如果您正苦于以下问题:Python models.AnonymousUser方法的具体用法?Python models.AnonymousUser怎么用?Python models.AnonymousUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app.models
的用法示例。
在下文中一共展示了models.AnonymousUser方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_anonymous_user
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous_user(self):
u = AnonymousUser()
self.assertFalse(u.can(Permission.FOLLOW))
示例2: test_anonymous_user
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous_user(self):
u = AnonymousUser()
self.assertFalse(u.operation(Permission.FOLLOW))
示例3: test_anonymous
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous(self):
u = AnonymousUser()
self.assertFalse(u.can(Permission.GENERAL))
示例4: test_anonymous_user_has_no_ride_request
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous_user_has_no_ride_request(self):
carpool = CarpoolFactory()
anonymous = AnonymousUser()
assert anonymous.get_ride_request_in_carpool(carpool) == None
示例5: test_anonymous_user_is_not_driver
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous_user_is_not_driver(self):
carpool = CarpoolFactory()
anonymous = AnonymousUser()
assert anonymous.is_driver(carpool) == False
示例6: test_anonymous_user
# 需要导入模块: from app import models [as 别名]
# 或者: from app.models import AnonymousUser [as 别名]
def test_anonymous_user(self):
u = AnonymousUser()
self.assertFalse(u.can(Permission.COMMENT))