test_save_mem.py 781 Bytes
import unittest
from atdd.PcPost import PcPost


class SaveMem(PcPost):
    def setUp(self):
        self.do_login(self.host, self.mobile, self.psw, self.domain)

    def test_add_mem(self):
        url = '/contact/Apicp/User/Save'
        data = {
            'field_name': 'api-boy',
            'memGender': 2,
            'memMobile': '13818801801',
            'memEmail': '13818801801@163.com',
            'dpName': '755DDF7E0A69039F0BA121026E5D4D00',
            'memJob': '755DDF0C0A6916AB3CE15C27CE2D41BB',
            'memRole': '755DE1790A692CB94314A8BA1FEC458A'  # 管理者
        }
        result = self.PcPost(url, data)
        print(self.host + '/' + self.domain + url)
        print(result)
        return result

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