本文整理汇总了Python中tests.factories.ProjectFactory.set_description方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectFactory.set_description方法的具体用法?Python ProjectFactory.set_description怎么用?Python ProjectFactory.set_description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.factories.ProjectFactory
的用法示例。
在下文中一共展示了ProjectFactory.set_description方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ApiSearchTestCase
# 需要导入模块: from tests.factories import ProjectFactory [as 别名]
# 或者: from tests.factories.ProjectFactory import set_description [as 别名]
class ApiSearchTestCase(ApiTestCase):
def setUp(self):
super(ApiSearchTestCase, self).setUp()
self.user = AuthUserFactory()
self.user_one = AuthUserFactory(fullname='Kanye Omari West')
self.user_one.schools = [{
'degree': 'English',
'institution': 'Chicago State University'
}]
self.user_one.jobs = [{
'title': 'Producer',
'institution': 'GOOD Music, Inc.'
}]
self.user_one.save()
self.user_two = AuthUserFactory(fullname='Chance The Rapper')
self.project = ProjectFactory(title='The Life of Pablo', creator=self.user_one, is_public=True)
self.project.set_description('Name one genius who ain\'t crazy', auth=Auth(self.user_one), save=True)
self.project.add_tag('Yeezus', auth=Auth(self.user_one), save=True)
self.project_two = ProjectFactory(title='Graduation', creator=self.user_one, is_public=True)
self.private_project = ProjectFactory(title='Coloring Book', creator=self.user_two)
self.component = NodeFactory(parent=self.project, title='Ultralight Beam', creator=self.user_two, is_public=True)
self.component.set_description('This is my part, nobody else speak', auth=Auth(self.user_two), save=True)
self.component.add_tag('trumpets', auth=Auth(self.user_two), save=True)
self.component_two = NodeFactory(parent=self.project, title='Highlights', creator=self.user_one, is_public=True)
self.private_component = NodeFactory(parent=self.project, title='Wavves', creator=self.user_one)
self.file = utils.create_test_file(self.component, self.user_one, filename='UltralightBeam.mp3')
self.file_two = utils.create_test_file(self.component_two, self.user_one, filename='Highlights.mp3')
self.private_file = utils.create_test_file(self.private_component, self.user_one, filename='Wavves.mp3')
def tearDown(self):
super(ApiSearchTestCase, self).tearDown()
search.delete_all()