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)
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)
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()))
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()))