Esempio n. 1
0
    def test_posting_payload_with_empty_pic(self):
        expected_payload = {
            "amount": AMOUNT,
            "memberValidation": MV_URL,
            "pic": ''
        }
        payload = postings._create_payload(AMOUNT, MV_URL, '')

        tools.assert_equal(expected_payload, payload)
Esempio n. 2
0
    def test_posting_payload_with_optional_kwargs(self):
        expected_payload = {
            "amount": AMOUNT,
            "memberValidation": MV_URL,
            'a': 'b',
            'c': 'd'
        }
        payload = postings._create_payload(AMOUNT, MV_URL, **ADDITIONAL_PARAMS)

        tools.assert_equal(expected_payload, payload)
Esempio n. 3
0
    def test_posting_payload_with_optional_credit_type(self):
        expected_payload = {
            "amount": AMOUNT,
            "memberValidation": MV_URL,
            "creditType": CREDIT_TYPE
        }
        payload = postings._create_payload(AMOUNT,
                                           MV_URL,
                                           credit_type=CREDIT_TYPE)

        tools.assert_equal(expected_payload, payload)
Esempio n. 4
0
    def test_posting_payload(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL}
        payload = postings._create_payload(AMOUNT, MV_URL)

        tools.assert_equal(expected_payload, payload)
Esempio n. 5
0
    def test_posting_payload_with_optional_kwargs(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL, 'a': 'b', 'c': 'd'}
        payload = postings._create_payload(AMOUNT, MV_URL, **ADDITIONAL_PARAMS)

        tools.assert_equal(expected_payload, payload)
Esempio n. 6
0
    def test_posting_payload_with_empty_credit_type(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL}
        payload = postings._create_payload(AMOUNT, MV_URL, credit_type='')

        tools.assert_equal(expected_payload, payload)
Esempio n. 7
0
    def test_posting_payload_with_optional_credit_type(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL, "creditType": CREDIT_TYPE}
        payload = postings._create_payload(AMOUNT, MV_URL, credit_type=CREDIT_TYPE)

        tools.assert_equal(expected_payload, payload)
Esempio n. 8
0
    def test_posting_payload_with_optional_pic(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL, "pic": PIC}
        payload = postings._create_payload(AMOUNT, MV_URL, PIC)

        tools.assert_equal(expected_payload, payload)
Esempio n. 9
0
    def test_posting_payload(self):
        expected_payload = {"amount": AMOUNT, "memberValidation": MV_URL}
        payload = postings._create_payload(AMOUNT, MV_URL)

        tools.assert_equal(expected_payload, payload)