Esempio n. 1
0
 def test_29_api_78dk_platform_cm_base_saveChannel_region_none(self):
     """
     所属大区为空添加子渠道失败
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname_stream,
             province="510000",
             region="",
             shortname=channelname_stream + '简称',
             parentchanneluuid=channelid))
     Assertion.verity(res['msg'], '所属大区不能为空,')
     Assertion.verity(res['code'], '20000')
Esempio n. 2
0
 def test_26_api_78dk_platform_cm_base_saveChannel_shortname_none(self):
     """
     ShortName为空添加子渠道失败
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname_stream,
             province="510000",
             region="510107",
             shortname='',
             parentchanneluuid=channelid))
     Assertion.verity(res['msg'], '渠道简称不能为空!')
     Assertion.verity(res['code'], '20000')
Esempio n. 3
0
 def test_23_api_78dk_platform_cm_base_saveChannel_state_close(self):
     """
     渠道开关状态为close后添加子渠道失败
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname_stream,
             province="510000",
             region="510107",
             shortname=channelname_stream + '简称',
             parentchanneluuid=channelid))
     Assertion.verity(res['msg'], '父级渠道不是开启状态,不能添加下级渠道!')
     Assertion.verity(res['code'], '20000')
Esempio n. 4
0
 def test_17_api_78dk_platform_cm_base_saveChannel_examine_false(self):
     """
     渠道审核不通过后添加子渠道失败
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname_stream,
             province="510000",
             region="510107",
             shortname=channelname_stream + '简称',
             parentchanneluuid=channelid))
     Assertion.verity(res['msg'], '父级渠道没有审核通过,不能添加下级渠道!')
     Assertion.verity(res['code'], '20000')
Esempio n. 5
0
 def test_30_api_78dk_platform_cm_base_saveChannel(self):
     """
     添加子渠道成功
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname_stream,
             province="510000",
             region="510107",
             shortname=channelname_stream + '简称',
             parentchanneluuid=channelid))
     Assertion.verity(res['msg'], '成功')
     Assertion.verity(res['code'], '10000')
     Assertion.verityContain(res['data'], 'freezeStateName')
     Assertion.verityContain(res['data'], 'openCloseStateName')
     global channelid_stream
     channelid_stream = res['data']['channelUuid']
Esempio n. 6
0
 def test_01_api_78dk_platform_cm_base_saveChannel(self):
     """
     添加渠道成功
     :return:
     """
     res = json.loads(
         WebAction.test_api_78dk_platform_cm_base_saveChannel(
             city="510100",
             name=channelname,
             province="510000",
             region="510107",
             shortname=channelname + '简称',
             parentchanneluuid=''))
     Assertion.verity(res['msg'], '成功')
     Assertion.verity(res['code'], '10000')
     Assertion.verityContain(res['data'], 'freezeStateName')
     Assertion.verityContain(res['data'], 'openCloseStateName')
     global channelid
     channelid = res['data']['channelUuid']
     loginAction.global_dict.set(channelid=res['data']['channelUuid'])