本文整理汇总了Python中api.views.UserViewSet方法的典型用法代码示例。如果您正苦于以下问题:Python views.UserViewSet方法的具体用法?Python views.UserViewSet怎么用?Python views.UserViewSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.views
的用法示例。
在下文中一共展示了views.UserViewSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_view_and_template
# 需要导入模块: from api import views [as 别名]
# 或者: from api.views import UserViewSet [as 别名]
def test_view_and_template(self):
# TODO TESTCASE api view and template
# use view_and_template()
# TODO which views?
# - UserViewSet
# view_and_template(self, UserViewSet, '', 'api:users')
view_and_template(self, ProjectViewSet, None, 'api:project-detail',
address_kwargs={'name_short': self.project.name_short})
# - 'timelogs'
# - 'notifications'
# - 'issues'
# - 'project'
# - 'project_timelogs'
# - 'project_issues'
# - 'project_sprints'
# - 'project_issues_comments'
# - 'project_issues_timelogs'
# - ...
pass
示例2: test_redirect_to_login_and_login_required
# 需要导入模块: from api import views [as 别名]
# 或者: from api.views import UserViewSet [as 别名]
def test_redirect_to_login_and_login_required(self):
self.client.logout()
# TODO TESTCASE api redirect to login and login required
# redirect_to_login_and_login_required()
# TODO which views?
# - UserViewSet
# - 'timelogs'
# - 'notifications'
# - 'issues'
# - 'project'
# - 'project_timelogs'
# - 'project_issues'
# - 'project_sprints'
# - 'project_issues_comments'
# - 'project_issues_timelogs'
# - ...
pass