本文整理汇总了Python中pontoon.base.tests.EntityFactory.create_batch方法的典型用法代码示例。如果您正苦于以下问题:Python EntityFactory.create_batch方法的具体用法?Python EntityFactory.create_batch怎么用?Python EntityFactory.create_batch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pontoon.base.tests.EntityFactory
的用法示例。
在下文中一共展示了EntityFactory.create_batch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from pontoon.base.tests import EntityFactory [as 别名]
# 或者: from pontoon.base.tests.EntityFactory import create_batch [as 别名]
def setUp(self):
self.resource = ResourceFactory.create()
self.locale = LocaleFactory.create()
ProjectLocale.objects.create(project=self.resource.project, locale=self.locale)
TranslatedResource.objects.create(resource=self.resource, locale=self.locale)
self.entities = EntityFactory.create_batch(3, resource=self.resource)
self.entities_pks = [e.pk for e in self.entities]
示例2: setUp
# 需要导入模块: from pontoon.base.tests import EntityFactory [as 别名]
# 或者: from pontoon.base.tests.EntityFactory import create_batch [as 别名]
def setUp(self):
# Create a list of instances in order to filter them.
EntityFactory.create_batch(10)