test_Mobile_MyIntegration.py 691 Bytes
import unittest
from atdd.MobileApiTest import MobileApiTest


# 点赞接口
class likeapi(MobileApiTest):
    def setUp(self):
        self.do_login()

    # 点赞
    def test_like(self):
        url = self.host + "/" + self.domain + "/Integral/Api/Like/Update"
        data = {
            "mem_uid": "C9E10E4A7F0000017B20C6105BF54EB5"
        }
        r = self.post(url, data=data)
        print(r.text)
        data = r.json()
        print(self.host + '/' + self.domain + '/Integral/Api/Like/Update')
        self.assertEqual("ok", data["errmsg"], msg=data["errmsg"])
        self.assertEqual(0, data["errcode"], msg=data["errcode"])

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