def test_find_all(self): with self.app_context: member, _ = self.add_member_to_db(self.member_1, self.role_1) members = MemberModel.find_all() self.assertEqual(members[0].id, member.id)
def get(self): # List comprehensions version return { 'members': [member.json() for member in MemberModel.find_all()] }