Exemplo n.º 1
0
 def test_get_donors_order(self):
     order = Order(completed=True,
                   owner_username=self.owner.username).save()
     order.mission.connect(self.mission)
     cache.clear()
     res = Mission.get_donors(self.mission.object_uuid)
     self.assertEqual(res[0], self.owner.username)
Exemplo n.º 2
0
 def test_get_donors(self):
     donation = Donation(amount=500,
                         completed=True,
                         owner_username=self.owner.username).save()
     donation.owned_by.connect(self.owner)
     donation.mission.connect(self.mission)
     cache.clear()
     res = Mission.get_donors(self.mission.object_uuid)
     self.assertEqual(res[0], self.owner.username)