コード例 #1
0
ファイル: listprojects.py プロジェクト: bartdag/recodoc2
    def handle_noargs(self, **options):
        header = ""
        projects = []
        if options.get("local", False):
            header = "Local projects:"
            projects = list_projects_local()
        else:
            header = "Projects in DB:"
            projects = list_projects_db()

        print(header)
        for project in projects:
            print("  " + project)
コード例 #2
0
    def handle_noargs(self, **options):
        header = ''
        projects = []
        if options.get('local', False):
            header = 'Local projects:'
            projects = list_projects_local()
        else:
            header = 'Projects in DB:'
            projects = list_projects_db()

        print(header)
        for project in projects:
            print('  ' + project)
コード例 #3
0
ファイル: tests.py プロジェクト: bartdag/recodoc2
 def testListProjectsDB(self):
     create_project_db("Project 1", "http://www.example1.com", "project1")
     create_project_db("Project 2", "http://www.example1.com", "project2")
     self.assertEqual(2, len(list_projects_db()))
コード例 #4
0
ファイル: tests.py プロジェクト: nengnengwu/recodoc2
 def testListProjectsDB(self):
     create_project_db('Project 1', 'http://www.example1.com', 'project1')
     create_project_db('Project 2', 'http://www.example1.com', 'project2')
     self.assertEqual(2, len(list_projects_db()))