'Create and set up apps for some filtering fun.'

def setUp(self):

    self.create_switch(name='view-transactions')
    self.url = reverse('mkt.developers.transactions')
    self.login('regular@mozilla.com')
    self.apps = [app_factory(), app_factory()]
    self.user = UserProfile.objects.get(id=999)
    for app in self.apps:
        AddonUser.objects.create(addon=app, user=self.user)
    tx0 = Contribution.objects.create(addon=self.apps[0], type=mkt.CONTRIB_PURCHASE, user=self.user, uuid=12345)
    tx1 = Contribution.objects.create(addon=self.apps[1], type=mkt.CONTRIB_REFUND, user=self.user, uuid=67890)
    tx0.update(created=datetime.date(2011, 12, 25))
    tx1.update(created=datetime.date(2012, 1, 1))
    self.txs = [tx0, tx1]
