test_SourceTotal.py 1 KB
import unittest
from atdd.PcApiTest import PcApiTest


class SourseTotal(PcApiTest):
    def setUp(self):
        self.do_login(self.host, self.mobile, self.psw, self.domain)

    # 近7天所有业务统计
    def test_total7all(self):
        interfaceUrl = "/Assistant/Apicp/Count/SourceTotal"
        data = {
        }
        result = self.PcApiTest(interfaceUrl, data)
        print(self.host + "/" + self.domain + interfaceUrl)
        print(result)
        return result

    # 昨天所有业务统计
    def test_total1all(self):
        headers = {"Content-Type": "application/x-www-form-urlencoded; charset=utf-8"}
        interfaceUrl = "/Assistant/Apicp/Count/SourceTotal"
        data = {
            "beginTotalTime": 1501603200000,
            "endTotalTime": 1501689599000
        }
        result = self.PcApiTest(interfaceUrl, data, headers=headers)
        print(self.host + "/" + self.domain + interfaceUrl)
        print(result)
        return result

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