本文整理汇总了Python中geokey.projects.tests.model_factories.ProjectFactory.status方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectFactory.status方法的具体用法?Python ProjectFactory.status怎么用?Python ProjectFactory.status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geokey.projects.tests.model_factories.ProjectFactory
的用法示例。
在下文中一共展示了ProjectFactory.status方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_post_save_project_when_deleting
# 需要导入模块: from geokey.projects.tests.model_factories import ProjectFactory [as 别名]
# 或者: from geokey.projects.tests.model_factories.ProjectFactory import status [as 别名]
def test_post_save_project_when_deleting(self):
project = ProjectFactory(**{'status': 'active'})
ExportFactory.create(**{'project': project})
project.status = 'deleted'
project.save
post_save_project(Project, instance=project)
self.assertEqual(
Export.objects.filter(project=project).exists(),
False
)
示例2: test_post_save_project_when_only_changing_status
# 需要导入模块: from geokey.projects.tests.model_factories import ProjectFactory [as 别名]
# 或者: from geokey.projects.tests.model_factories.ProjectFactory import status [as 别名]
def test_post_save_project_when_only_changing_status(self):
project = ProjectFactory(**{'status': 'active'})
ExportFactory.create(**{'project': project})
project.status = 'pending'
project.save
post_save_project(Project, instance=project)
self.assertEqual(
Export.objects.filter(project=project).exists(),
True
)