示例#1
0
文件: view_tests.py 项目: cns-iu/nwb
def save_n_projects_with_tag(user, n, tag):    	
    for i in range(n):
    	project = Project(creator=user)
    	project.name = 'test_project_name_' + str(i)
    	project.is_active = True
    	project.save()
    	Tagging.objects.add_tags_and_return_added_tag_names(tag, project, user)	
示例#2
0
def _create_project1():
    project1 = Project(creator=bob,
                       name='Test Project1',
                       description='Description of Test Project1',
                       is_active=True)
    project1.save()
    
    return project1
示例#3
0
def save_n_projects_with_category(user, n, category):    	
    for i in range(n):
    	project = Project(creator=user)
    	project.name = 'test_project_name_' + str(i)
    	project.is_active = True
    	project.category = category
    	project.save()
示例#4
0
文件: tests.py 项目: cns-iu/nwb
def save_n_projects(user, n):
    for i in range(n):
    	project = Project(creator=user)
    	project.name = 'test_project_name_' + str(i)
    	project.is_active = True
    	project.save()