本文整理汇总了Python中tests.factories.RegistrationFactory.remove方法的典型用法代码示例。如果您正苦于以下问题:Python RegistrationFactory.remove方法的具体用法?Python RegistrationFactory.remove怎么用?Python RegistrationFactory.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.factories.RegistrationFactory
的用法示例。
在下文中一共展示了RegistrationFactory.remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_view_project_pending_registration_for_admin_contributor_does_contain_cancel_link
# 需要导入模块: from tests.factories import RegistrationFactory [as 别名]
# 或者: from tests.factories.RegistrationFactory import remove [as 别名]
def test_view_project_pending_registration_for_admin_contributor_does_contain_cancel_link(self):
pending_reg = RegistrationFactory(project=self.node, archive=True)
assert_true(pending_reg.is_pending_registration)
result = _view_project(pending_reg, Auth(self.user))
assert_not_equal(result["node"]["disapproval_link"], "")
assert_in("/?token=", result["node"]["disapproval_link"])
pending_reg.remove()
示例2: test_view_project_pending_registration_for_write_contributor_does_not_contain_cancel_link
# 需要导入模块: from tests.factories import RegistrationFactory [as 别名]
# 或者: from tests.factories.RegistrationFactory import remove [as 别名]
def test_view_project_pending_registration_for_write_contributor_does_not_contain_cancel_link(self):
write_user = UserFactory()
self.node.add_contributor(write_user, permissions=permissions.WRITE, auth=Auth(self.user), save=True)
pending_reg = RegistrationFactory(project=self.node, archive=True)
assert_true(pending_reg.is_pending_registration)
result = _view_project(pending_reg, Auth(write_user))
assert_equal(result["node"]["disapproval_link"], "")
pending_reg.remove()