예제 #1
0
    def test_pay_link(self):
        """Tests empty pay link.
        """
        locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
        from muecke.payment.utils import process_payment
        result = process_payment(self.request)

        order = Order.objects.filter()[0]
        self.assertEqual(order.get_pay_link(self.request), "")
예제 #2
0
파일: tests.py 프로젝트: aw1n/django-muecke
    def test_pay_link(self):
        """Tests empty pay link.
        """
        locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
        from muecke.payment.utils import process_payment
        result = process_payment(self.request)

        order = Order.objects.filter()[0]
        self.assertEqual(order.get_pay_link(self.request), "")
예제 #3
0
    def test_paypal_link(self):
        """Tests created paypal link.
        """
        payment_method, created = PaymentMethod.objects.get_or_create(
            id=3,
            name="PayPal",
            active=True,
        )

        self.customer.selected_payment_method = payment_method
        self.customer.save()

        from muecke.payment.utils import process_payment
        result = process_payment(self.request)

        order = Order.objects.filter()[0]
        self.failIf(order.get_pay_link(self.request).find("paypal") == -1)
예제 #4
0
파일: tests.py 프로젝트: aw1n/django-muecke
    def test_paypal_link(self):
        """Tests created paypal link.
        """
        payment_method, created = PaymentMethod.objects.get_or_create(
            id=3,
            name="PayPal",
            active=True,
        )

        self.customer.selected_payment_method = payment_method
        self.customer.save()

        from muecke.payment.utils import process_payment
        result = process_payment(self.request)

        order = Order.objects.filter()[0]
        self.failIf(order.get_pay_link(self.request).find("paypal") == -1)