def tearDown(self): self.app_context.pop() User.drop_collection() Team.drop_collection() Project.drop_collection() Item.drop_collection() TodoList.drop_collection()
def team_dict(team): return { 'name': team.name, 'projects': [ {'name': project.name, 'id': project.id} for project in Project.get_projects_for_team(team) ]}