'Checks that filter returns the expected ids
expected_ids -- list of app ids expected in the result.'

def do_filter(self, expected_txs, **kw):

    qs = _filter_transactions(Contribution.objects.all(), kw)
    self.assertSetEqual(qs.values_list('id', flat=True), [tx.id for tx in expected_txs])
