I am working for a web-app using django-1.6 where there will be application(s) coming in and going through various stages of scrutiny. On satisfying criteria(s), they get approved and promoted to the next stage or get deferred. I was testing the approval transition. And landed up in situation where I need to assert if approvable application(s) have their status changed to pending for the next stage. So, this is how I do it right now:
self.assertEqual('stage2.pending', stage1_approved_mentor_applications[0].status)
what I am looking for is something like
self.assertEqual('stage2.pending', stage1_approved_mentor_applications.status)
which would assure that all the objects in the list stage1_approved_mentor_applications have their status as 'stage2.pending'. One way would be to pass it to a function taking a list and returning True on all status being 'stage2.pending' and False if otherwise. This function will be called in assertTrue. Wondering if there's already a workaround for this that would save me from reinventing the wheel.
Can anyone help me with that? Thanks in advance.