invoice_update.py 1.32 KB
import unittest
import json
from atdd.ATDDCase import ATDDCase

class Update(ATDDCase):
    def setUp(self):
        pass

    def test_invoice_update(self):
        app = 'yuanquan'
        header_json = {"Content-Type": "application/json; charset=utf-8"}
        url = self.uc_host + '/b/' + self.domain + "/qy/invoice/update"
        data = {
            "enterprise": self.domain,
            "app": app,
            "invoAmount": 200000,
            "invoHeader": "123",
            "invoType": "1",
            "invoIdCode": "123",
            "invoRegisterAddress": "12",
            "invoRegisterPhone": "3",
            "invoBankName": "3",
            "invoAccout": "3",
            "invoReceiver": "颤抖",
            "invoReceiverPhone": "22",
            "invoReceiverAddress": "22",
            "invoId": "3FE0606D0A69039F3B3826CD62E919A6",
            "invoStatus": 2,
            "invoTime": 1521484789512,
            "invoUpdated": 0,
            "invoCompanyName": "123",
            "invoContent": "软件服务费",
            "invoCreated": 1521484789729,
            "invoInvoiceStatus": 4,
            "invoAuditTime": 1521484789729

        }
        print(url, json.dumps(data))
        result = self.post(url, None, json=data, headers=header_json)
        print(result.json())

if __name__ == '__main__':
    unittest.main()