Пример #1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Commonlib.base_driver import BaseDriver
from Commonlib.commonlib import Commonlib
from Page.Bussiness.load_video_bussiness import LoadVideoBussiness
from parameterized import parameterized
from Commonlib.logg import LoggIn
from Commonlib.read_json import BulidDat
import unittest
# def bulid_data():
# 	return [
# 		("admin","111111","视频管理",True),
# 		("admin","11223344","声像情报分析系统",False),
# 	]
buliddata = BulidDat("../Data/b_load_video_login_test.json")


def bulid_data():
    """读取json数据"""
    datalist = buliddata.get_value("username", "pwd", "expect", "is_sucess")
    return datalist


class LoadVideoLogin(unittest.TestCase):
    """登录上传视频的正反例"""
    def setUp(self):
        self.dr = BaseDriver().getdriver()
        self.c = Commonlib(self.dr)
        self.b = LoadVideoBussiness(self.dr)

    def tearDown(self):
Пример #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Commonlib.read_json import BulidDat
buliddata = BulidDat("../Data/a_login_test.json")
def bulid_data():
	"""定义读取json数据应用到测试案例里"""
	datas = buliddata.get_value("username","pwd","expect","is_sucess")
	print(datas)
	return datas

bulid_data()
Пример #3
0
# -*- coding: utf-8 -*-
from Page.Bussiness.upload_video_business import UpLoadVideoBusiness
from Commonlib.base_driver import BaseDriver
from Commonlib.commonlib import Commonlib
from Commonlib.logg import LoggIn
from parameterized import parameterized, param
from Commonlib.read_json import BulidDat
import unittest

# def bulid_data():
# 	return [
# 		("admin","111111","本地上传",True),
# 		("admin","111111","上传的视频必须是 MP4/AVI/MPG/WMV/3GP/MOV/ASF/ASX/FLV 格式 !",False)
# 	]

buliddata = BulidDat("../Data/c_upload_video.json")


def bulid_data():
    datalist = buliddata.get_value("username", "pwd", "expect", "is_sucess")
    return datalist


class UpLoadVideoTest(unittest.TestCase):
    """上传正常格式视频和非正常格式视频"""
    def setUp(self) -> None:
        self.lo = LoggIn()
        self.dr = BaseDriver().getdriver()
        self.c = Commonlib(self.dr)
        self.c.solv_log_waring()
        self.b = UpLoadVideoBusiness(self.dr)
Пример #4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Commonlib.commonlib import Commonlib
from Commonlib.base_driver import BaseDriver
from Commonlib.logg import LoggIn
from Page.Bussiness.yinshipin_bussiness import YinShiPinBusiness
from parameterized import parameterized, param
from Commonlib.read_json import BulidDat
import unittest

# def bulid_data():
# 	return [
# 		("admin","111111","['时事热点', '内网自编', '外网资源', '外网资源']",True)
# 	]

buliddata = BulidDat("../Data/d_yinshipin.json")


def bulid_data():
    datalist = buliddata.get_value("username", "pwd", "expect", "is_sucess")
    return datalist


class YinShiPinTest(unittest.TestCase):
    """点击音视频栏目,拿到下面子栏目的title"""
    def setUp(self) -> None:
        self.lo = LoggIn()
        driver = BaseDriver().getdriver()
        self.c = Commonlib(driver)
        self.c.solv_log_waring()
        self.b = YinShiPinBusiness(driver)
Пример #5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from Page.Bussiness.persons_bank_business import PersonsBankBusiness
from Page.Bussiness.login_bussiness import LoginBussiness
from Commonlib.base_driver import BaseDriver
from Commonlib.logg import LoggIn
from Commonlib.commonlib import Commonlib
from parameterized import parameterized,param
from Commonlib.read_json import BulidDat
# def bulid_data():
# 	return [
# 		("admin","111111","['知名人物','未知人物a']",True)

builddata = BulidDat("../Data/e_character_bank_test.json")
def bulid_data():
	datalist = builddata.get_value("username","pwd","expect","is_sucess")
	return datalist

class PersonsBank(unittest.TestCase):
	"""登录系统切换到人物库"""

	def setUp(self) -> None:
		self.lo = LoggIn()
		driver = BaseDriver().getdriver()
		self.c = Commonlib(driver)
		self.c.solv_log_waring()
		self.pbb = PersonsBankBusiness(driver)
		self.lob = LoginBussiness(driver)

	def tearDown(self) -> None: