本文整理匯總了Python中auvsi_suas.models.target.Target.actionable_submission方法的典型用法代碼示例。如果您正苦於以下問題:Python Target.actionable_submission方法的具體用法?Python Target.actionable_submission怎麽用?Python Target.actionable_submission使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類auvsi_suas.models.target.Target
的用法示例。
在下文中一共展示了Target.actionable_submission方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_actionable_submission
# 需要導入模塊: from auvsi_suas.models.target import Target [as 別名]
# 或者: from auvsi_suas.models.target.Target import actionable_submission [as 別名]
def test_actionable_submission(self):
"""Tests actionable_submission correctly filters submissions."""
# t1 created and updated before take off.
t1 = Target(user=self.user, target_type=TargetType.standard)
t1.save()
t1.alphanumeric = 'A'
t1.save()
# t2 created before take off and updated in flight.
t2 = Target(user=self.user, target_type=TargetType.standard)
t2.save()
event = TakeoffOrLandingEvent(user=self.user, uas_in_air=True)
event.save()
t2.alphanumeric = 'A'
t2.save()
# t3 created and updated in flight.
t3 = Target(user=self.user, target_type=TargetType.standard)
t3.save()
t3.alphanumeric = 'A'
t3.save()
# t4 created in flight and updated after landing.
t4 = Target(user=self.user, target_type=TargetType.standard)
t4.save()
event = TakeoffOrLandingEvent(user=self.user, uas_in_air=False)
event.save()
t4.alphanumeric = 'A'
t4.save()
# t5 created and updated after landing.
t5 = Target(user=self.user, target_type=TargetType.standard)
t5.save()
t5.alphanumeric = 'A'
t5.save()
# t6 created and updated in second flight.
event = TakeoffOrLandingEvent(user=self.user, uas_in_air=True)
event.save()
t6 = Target(user=self.user, target_type=TargetType.standard)
t6.save()
t6.alphanumeric = 'A'
t6.save()
event = TakeoffOrLandingEvent(user=self.user, uas_in_air=False)
event.save()
self.assertFalse(t1.actionable_submission())
self.assertFalse(t2.actionable_submission())
self.assertTrue(t3.actionable_submission())
self.assertFalse(t4.actionable_submission())
self.assertFalse(t5.actionable_submission())
self.assertFalse(t6.actionable_submission())