Пример #1
0
 def setUp(self):
     self.crowdfund = CrowdfundFactory()
     project = ProjectFactory()
     ProjectCrowdfunds.objects.create(crowdfund=self.crowdfund, project=project)
     self.url = self.crowdfund.get_absolute_url()
     self.data = {
         'amount': 200,
         'show': '',
         'crowdfund': self.crowdfund.pk,
         'email': '*****@*****.**'
     }
     self.request_factory = RequestFactory()
     self.view = CrowdfundDetailView.as_view()
Пример #2
0
 def setUp(self):
     self.crowdfund = CrowdfundFactory()
     project = ProjectFactory()
     ProjectCrowdfunds.objects.create(crowdfund=self.crowdfund,
                                      project=project)
     self.url = self.crowdfund.get_absolute_url()
     self.data = {
         "amount": 200,
         "show": "",
         "crowdfund": self.crowdfund.pk,
         "email": "*****@*****.**",
     }
     self.request_factory = RequestFactory()
     self.view = CrowdfundDetailView.as_view()
Пример #3
0
 def setUp(self):
     due = date.today() + timedelta(30)
     self.crowdfund = CrowdfundFactory(date_due=due)
     FOIARequestFactory(status='payment',
                        price=self.crowdfund.payment_required,
                        crowdfund=self.crowdfund)
     self.num_payments = self.crowdfund.payments.count()
     self.url = self.crowdfund.get_absolute_url()
     self.data = {
         'stripe_amount': 200,
         'show': '',
         'crowdfund': self.crowdfund.pk,
         'stripe_email': '*****@*****.**',
         'stripe_token': 'test'
     }
     self.view = CrowdfundDetailView.as_view()
     self.request_factory = RequestFactory()
Пример #4
0
 def setUp(self):
     due = date.today() + timedelta(30)
     self.crowdfund = CrowdfundFactory(date_due=due)
     FOIARequestFactory(
         status="payment",
         price=self.crowdfund.payment_required,
         crowdfund=self.crowdfund,
     )
     self.num_payments = self.crowdfund.payments.count()
     self.url = self.crowdfund.get_absolute_url()
     self.data = {
         "stripe_amount": 200,
         "show": "",
         "crowdfund": self.crowdfund.pk,
         "stripe_email": "*****@*****.**",
         "stripe_token": "test",
     }
     self.view = CrowdfundDetailView.as_view()
     self.request_factory = RequestFactory()