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)
Example #2
0
 def get(self):
     # List comprehensions version
     return {
         'members': [member.json() for member in MemberModel.find_all()]
     }