本文整理汇总了Python中nectar_allocations.models.allocation.AllocationRequest.save方法的典型用法代码示例。如果您正苦于以下问题:Python AllocationRequest.save方法的具体用法?Python AllocationRequest.save怎么用?Python AllocationRequest.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nectar_allocations.models.allocation.AllocationRequest
的用法示例。
在下文中一共展示了AllocationRequest.save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_find_active_allocations_excluding_3_null_fors
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import save [as 别名]
def test_find_active_allocations_excluding_3_null_fors(self):
request0 = AllocationRequest(project_name='Project0', status='A')
request0.field_of_research_1 = None
request0.field_of_research_2 = None
request0.field_of_research_3 = None
request0.save()
allocations = AllocationRequest.find_active_allocations()
self.assertEquals(2, len(allocations))
示例2: test_find_active_allocations_including_new_requests
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import save [as 别名]
def test_find_active_allocations_including_new_requests(self):
request0 = AllocationRequest(project_name='Project0', status='A')
request0.field_of_research_1 = '11'
request0.field_of_research_2 = '22'
request0.field_of_research_3 = '33'
request0.save()
allocations = AllocationRequest.find_active_allocations()
self.assertEquals(3, len(allocations))