esl_working测试用例脚本

作者在 2016-10-18 21:28:00 发布以下内容
#-*- coding:UTF-8 -*-
import sys, unittest, xmlrpclib, time, socket, select, multiprocessing , random,sqlite3
from main import database
import esl_init
from main import create_task_data
from SimpleXMLRPCServer import SimpleXMLRPCServer
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
import os
from xml.dom import minidom
from PublicFunction import ReadXml


server = xmlrpclib.ServerProxy('http://127.0.0.1:9000')
db = database.DB()
global P
P = ReadXml()


#因为更新了用例,所以在修改用例编号,可以跑的在用例中都用脚本标出来了,unbind 需要改下用例编号,实际可以使用,但是编号不一样,需要用以前的用例做比较

class BIND(unittest.TestCase):  #正在添加,暂时不能使用
	def setUp(self):
		pass
	def tearDown(self):
		# pass
		time.sleep(3)
		# P.sql('delete from bind_list')
	def test_case8(self):
		#8
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata", 0, "send_cmd8")
		print a
		ret,val = P.s(P.r("testdata", 0, "type8"),eval(a))
		print ret,val
		self.assertEqual(P.r("testdata", 0, "ok8"),ret)
		print ret
		self.assertEqual(P.r("testdata", 0, "act8"),val[0]['bak'])
		print val[0]['bak']
		self.assertEqual(P.r("testdata", 0, "ret8"),val[0]['ret'])
		print val[0]['ret']
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database8"),P.b("54-76-D9-99"))
	def test_case10(self):
		#10
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata", 0, "send_cmd10")
		ret,val = P.s(P.r("testdata", 0, "type10"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok10"),ret)
		self.assertEqual(P.r("testdata", 0, "act10"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret10"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database10"),P.b("54-76-D9-99"))
	def test_case12(self):
		#12
		a =  P.r("testdata", 0, "send_cmd12")
		ret,val = P.s(P.r("testdata", 0, "type12"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok12"),ret)
		self.assertEqual(P.r("testdata", 0, "act12"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret12"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database12"),P.b("54-76-D9-99"))		
	def test_case13(self):
		#13
		a =  P.r("testdata", 0, "send_cmd13")
		ret,val = P.s(P.r("testdata", 0, "type13"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok13"),ret)
		self.assertEqual(P.r("testdata", 0, "act13"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret13"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database13"),P.b("54-76-D9-99"))		
	def test_case15(self):
		#15
		a =  P.r("testdata", 0, "send_cmd15")
		ret,val = P.s(P.r("testdata", 0, "type15"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok15"),ret)
		self.assertEqual(P.r("testdata", 0, "act15"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret15"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database15"),P.b("54-76-D9-99"))
	def test_case16(self):
		#16
		a =  P.r("testdata", 0, "send_cmd16")
		ret,val = P.s(P.r("testdata", 0, "type16"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok16"),ret)
		self.assertEqual(P.r("testdata", 0, "act16"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret16"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database16"),P.b("54-76-D9-99"))		
	def test_case18(self):
		#18
		a =  P.r("testdata", 0, "send_cmd18")
		ret,val = P.s(P.r("testdata", 0, "type18"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok18"),ret)
		self.assertEqual(P.r("testdata", 0, "act18"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret18"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database18"),P.b("54-76-D9-99"))		
	def test_case19(self):
		#19
		a =  P.r("testdata", 0, "send_cmd19")
		ret,val = P.s(P.r("testdata", 0, "type19"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok19"),ret)
		self.assertEqual(P.r("testdata", 0, "act19"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret19"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database19"),P.b("54-76-D9-99"))
	def test_case21(self):
		#21
		a =  P.r("testdata", 0, "send_cmd21")
		ret,val = P.s(P.r("testdata", 0, "type21"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok21"),ret)
		self.assertEqual(P.r("testdata", 0, "act21"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret21"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database21"),P.b("54-76-D9-99"))		
	def test_case22(self):
		#22
		a =  P.r("testdata", 0, "send_cmd22")
		ret,val = P.s(P.r("testdata", 0, "type22"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok22"),ret)
		self.assertEqual(P.r("testdata", 0, "act22"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret22"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database22"),P.b("54-76-D9-99"))		
	def test_case23(self):
		#23
		a =  P.r("testdata", 0, "send_cmd23")
		ret,val = P.s(P.r("testdata", 0, "type23"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok23"),ret)
		self.assertEqual(P.r("testdata", 0, "act23"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret23"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database23"),P.b("54-76-D9-99"))
	def test_case24(self):
		#24
		a =  P.r("testdata", 0, "send_cmd24")
		ret,val = P.s(P.r("testdata", 0, "type24"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok24"),ret)
		self.assertEqual(P.r("testdata", 0, "act24"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret24"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database24"),P.b("54-76-D9-99"))		
	def test_case25(self):
		#25
		a =  P.r("testdata", 0, "send_cmd25")
		ret,val = P.s(P.r("testdata", 0, "type25"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok25"),ret)
		self.assertEqual(P.r("testdata", 0, "act25"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret25"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database25"),P.b("54-76-D9-99"))		
	def test_case26(self):
		#26
		a =  P.r("testdata", 0, "send_cmd26")
		ret,val = P.s(P.r("testdata", 0, "type26"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok26"),ret)
		self.assertEqual(P.r("testdata", 0, "act26"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret26"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database26"),P.b("54-76-D9-99"))		
	def test_case27(self):
		#27
		a =  P.r("testdata", 0, "send_cmd27")
		ret,val = P.s(P.r("testdata", 0, "type27"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok27"),ret)
		self.assertEqual(P.r("testdata", 0, "act27"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret27"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database27"),P.b("54-76-D9-99"))
	def test_case28(self):
		#28
		a =  P.r("testdata", 0, "send_cmd28")
		ret,val = P.s(P.r("testdata", 0, "type28"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok28"),ret)
		self.assertEqual(P.r("testdata", 0, "act28"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret28"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database28"),P.b("54-76-D9-99"))
	def test_case29(self):
		#29
		a =  P.r("testdata", 0, "send_cmd29")
		ret,val = P.s(P.r("testdata", 0, "type29"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok29"),ret)
		self.assertEqual(P.r("testdata", 0, "act29"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret29"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database29"),P.b("54-76-D9-99"))
	def test_case30(self):
		#30
		a =  P.r("testdata", 0, "send_cmd30")
		ret,val = P.s(P.r("testdata", 0, "type30"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok30"),ret)
		self.assertEqual(P.r("testdata", 0, "act30"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret30"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database30"),P.b("54-76-D9-99"))
	def test_case31(self):
		#31
		a =  P.r("testdata", 0, "send_cmd31")
		ret,val = P.s(P.r("testdata", 0, "type31"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok31"),ret)
		self.assertEqual(P.r("testdata", 0, "act31"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret31"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database31"),P.b("54-76-D9-99"))
	def test_case32(self):
		#32
		a =  P.r("testdata", 0, "send_cmd32")
		ret,val = P.s(P.r("testdata", 0, "type32"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok32"),ret)
		self.assertEqual(P.r("testdata", 0, "act32"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret32"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database32"),P.b("54-76-D9-99"))		
	def test_case33(self):
		#33
		a =  P.r("testdata", 0, "send_cmd33")
		ret,val = P.s(P.r("testdata", 0, "type33"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok33"),ret)
		self.assertEqual(P.r("testdata", 0, "act33"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret33"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database33"),P.b("54-76-D9-99"))
	def test_case34(self):
		#34
		a =  P.r("testdata", 0, "send_cmd34")
		ret,val = P.s(P.r("testdata", 0, "type34"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok34"),ret)
		self.assertEqual(P.r("testdata", 0, "act34"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret34"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database34"),P.b("54-76-D9-99"))
	def test_case35(self):
		#35
		a =  P.r("testdata", 0, "send_cmd35")
		ret,val = P.s(P.r("testdata", 0, "type35"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok35"),ret)
		self.assertEqual(P.r("testdata", 0, "act35"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret35"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database35"),P.b("54-76-D9-99"))		
	def test_case36(self):
		#36
		a =  P.r("testdata", 0, "send_cmd36")
		ret,val = P.s(P.r("testdata", 0, "type36"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok36"),ret)
		self.assertEqual(P.r("testdata", 0, "act36"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret36"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database36"),P.b("54-76-D9-99"))
	def test_case37(self):
		#37
		a =  P.r("testdata", 0, "send_cmd37")
		ret,val = P.s(P.r("testdata", 0, "type37"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok37"),ret)
		self.assertEqual(P.r("testdata", 0, "act37"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret37"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database37"),P.b("54-76-D9-99"))
	def test_case38(self):
		#38
		a =  P.r("testdata", 0, "send_cmd38")
		ret,val = P.s(P.r("testdata", 0, "type38"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok38"),ret)
		self.assertEqual(P.r("testdata", 0, "act38"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret38"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database38"),P.b("54-76-D9-99"))
	def test_case39(self):
		#39
		a =  P.r("testdata", 0, "send_cmd39")
		ret,val = P.s(P.r("testdata", 0, "type39"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok39"),ret)
		self.assertEqual(P.r("testdata", 0, "act39"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret39"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database39"),P.b("54-76-D9-99"))		
	def test_case40(self):
		#40
		a =  P.r("testdata", 0, "send_cmd40")
		ret,val = P.s(P.r("testdata", 0, "type40"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok40"),ret)
		self.assertEqual(P.r("testdata", 0, "act40"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret40"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database40"),P.b("54-76-D9-99"))
	def test_case41(self):
		#41
		a =  P.r("testdata", 0, "send_cmd41")
		ret,val = P.s(P.r("testdata", 0, "type41"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok41"),ret)
		self.assertEqual(P.r("testdata", 0, "act41"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret41"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database41"),P.b("54-76-D9-99"))		
	def test_case42(self):
		#42
		a =  P.r("testdata", 0, "send_cmd42")
		ret,val = P.s(P.r("testdata", 0, "type42"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok42"),ret)
		self.assertEqual(P.r("testdata", 0, "act42"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret42"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database42"),P.b("54-76-D9-99"))
	def test_case43(self):
		#43
		a =  P.r("testdata", 0, "send_cmd43")
		ret,val = P.s(P.r("testdata", 0, "type43"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok43"),ret)
		self.assertEqual(P.r("testdata", 0, "act43"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret43"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database43"),P.b("54-76-D9-99"))		
	def test_case44(self):
		#44
		a =  P.r("testdata", 0, "send_cmd44")	
		ret,val = P.s(P.r("testdata", 0, "type44"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok44"),ret)
		self.assertEqual(P.r("testdata", 0, "act44"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret44"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database44"),P.b("54-76-D9-99"))
	def test_case45(self):
		#45
		a =  P.r("testdata", 0, "send_cmd45")	
		ret,val = P.s(P.r("testdata", 0, "type45"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok45"),ret)
		self.assertEqual(P.r("testdata", 0, "act45"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret45"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database45"),P.b("54-76-D9-99"))
	def test_case46(self):
		#46
		a =  P.r("testdata", 0, "send_cmd46")	
		ret,val = P.s(P.r("testdata", 0, "type46"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok46"),ret)
		self.assertEqual(P.r("testdata", 0, "act46"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret46"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database46"),P.b("54-76-D9-99"))
	def test_case47(self):
		#47
		a =  P.r("testdata", 0, "send_cmd47")	
		ret,val = P.s(P.r("testdata", 0, "type47"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok47"),ret)
		self.assertEqual(P.r("testdata", 0, "act47"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret47"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database47"),P.b("54-76-D9-99"))
	def test_case48(self):
		#48
		a =  P.r("testdata", 0, "send_cmd48")	
		ret,val = P.s(P.r("testdata", 0, "type48"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok48"),ret)
		self.assertEqual(P.r("testdata", 0, "act48"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret48"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database48"),P.b("54-76-D9-99"))
	def test_case49(self):
		#49
		a =  P.r("testdata", 0, "send_cmd49")	
		ret,val = P.s(P.r("testdata", 0, "type49"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok49"),ret)
		self.assertEqual(P.r("testdata", 0, "act49"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret49"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database49"),P.b("54-76-D9-99"))		
	def test_case50(self):
		#50
		a =  P.r("testdata", 0, "send_cmd50")	
		ret,val = P.s(P.r("testdata", 0, "type50"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok50"),ret)
		self.assertEqual(P.r("testdata", 0, "act50"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret50"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database50"),P.b("54-76-D9-99"))		
	def test_case51(self):
		#51
		a =  P.r("testdata", 0, "send_cmd51")	
		ret,val = P.s(P.r("testdata", 0, "type51"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok51"),ret)
		self.assertEqual(P.r("testdata", 0, "act51"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret51"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database51"),P.b("54-76-D9-99"))

	def test_case52(self):
		#52
		a =  P.r("testdata", 0, "send_cmd52")	
		ret,val = P.s(P.r("testdata", 0, "type52"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok52"),ret)
		self.assertEqual(P.r("testdata", 0, "act52"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret52"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database52"),P.b("54-76-D9-99"))

	def test_case53(self):
		#53
		a =  P.r("testdata", 0, "send_cmd53")	
		ret,val = P.s(P.r("testdata", 0, "type53"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok53"),ret)
		self.assertEqual(P.r("testdata", 0, "act53"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret53"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database53"),P.b("54-76-D9-99"))

	def test_case54(self):
		#54
		a =  P.r("testdata", 0, "send_cmd54")	
		ret,val = P.s(P.r("testdata", 0, "type54"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok54"),ret)
		self.assertEqual(P.r("testdata", 0, "act54"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret54"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database54"),P.b("54-76-D9-99"))		
	def test_case55(self):
		#55
		a =  P.r("testdata", 0, "send_cmd55")	
		ret,val = P.s(P.r("testdata", 0, "type55"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok55"),ret)
		self.assertEqual(P.r("testdata", 0, "act55"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret55"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database55"),P.b("54-76-D9-99"))		
	def test_case56(self):
		#56
		a =  P.r("testdata", 0, "send_cmd56")	
		ret,val = P.s(P.r("testdata", 0, "type56"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok56"),ret)
		self.assertEqual(P.r("testdata", 0, "act56"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret56"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database56"),P.b("54-76-D9-99"))		
	def test_case57(self):
		#57
		a =  P.r("testdata", 0, "send_cmd57")	
		ret,val = P.s(P.r("testdata", 0, "type57"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok57"),ret)
		self.assertEqual(P.r("testdata", 0, "act57"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret57"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database57"),P.b("54-76-D9-99"))

	def test_case58(self):
		#58
		a =  P.r("testdata", 0, "send_cmd58")	
		ret,val = P.s(P.r("testdata", 0, "type58"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok58"),ret)
		self.assertEqual(P.r("testdata", 0, "act58"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret58"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database58"),P.b("54-76-D9-99"))

	def test_case59(self):
		#59
		a =  P.r("testdata", 0, "send_cmd59")	
		ret,val = P.s(P.r("testdata", 0, "type59"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok59"),ret)
		self.assertEqual(P.r("testdata", 0, "act59"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret59"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database59"),P.b("54-76-D9-99"))

	def test_case60(self):
		#60
		a =  P.r("testdata", 0, "send_cmd60")	
		ret,val = P.s(P.r("testdata", 0, "type60"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok60"),ret)
		self.assertEqual(P.r("testdata", 0, "act60"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret60"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database60"),P.b("54-76-D9-99"))

	def test_case61(self):
		#61
		a =  P.r("testdata", 0, "send_cmd61")	
		ret,val = P.s(P.r("testdata", 0, "type61"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok61"),ret)
		self.assertEqual(P.r("testdata", 0, "act61"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret61"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database61"),P.b("54-76-D9-99"))

	def test_case62(self):
		#62
		a =  P.r("testdata", 0, "send_cmd62")	
		ret,val = P.s(P.r("testdata", 0, "type62"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok62"),ret)
		self.assertEqual(P.r("testdata", 0, "act62"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret62"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database62"),P.b("54-76-D9-99"))

	def test_case63(self):
		#63
		a =  P.r("testdata", 0, "send_cmd63")	
		ret,val = P.s(P.r("testdata", 0, "type63"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok63"),ret)
		self.assertEqual(P.r("testdata", 0, "act63"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret63"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database63"),P.b("54-76-D9-99"))		
	def test_case64(self):
		#64
		a =  P.r("testdata", 0, "send_cmd64")	
		ret,val = P.s(P.r("testdata", 0, "type64"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok64"),ret)
		self.assertEqual(P.r("testdata", 0, "act64"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret64"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database64"),P.b("54-76-D9-99"))

	def test_case65(self):
		#65
		a =  P.r("testdata", 0, "send_cmd65")	
		ret,val = P.s(P.r("testdata", 0, "type65"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok65"),ret)
		self.assertEqual(P.r("testdata", 0, "act65"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret65"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database65"),P.b("54-76-D9-99"))

	def test_case66(self):
		#66
		a =  P.r("testdata", 0, "send_cmd66")	
		ret,val = P.s(P.r("testdata", 0, "type66"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok66"),ret)
		self.assertEqual(P.r("testdata", 0, "act66"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret66"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database66"),P.b("54-76-D9-99"))

	def test_case67(self):
		#67
		a =  P.r("testdata", 0, "send_cmd67")	
		ret,val = P.s(P.r("testdata", 0, "type67"),eval(a))
		self.assertEqual(P.r("testdata", 0, "ok67"),ret)
		self.assertEqual(P.r("testdata", 0, "act67"),val[0]['bak'])
		self.assertEqual(P.r("testdata", 0, "ret67"),val[0]['ret'])
		time.sleep(2)
		self.assertEqual(P.r("testdata",0,"database67"),P.b("54-76-D9-99"))
		
class UNBIND(unittest.TestCase):   #解绑功能以老的用例为主
	def SetUp(self):
		pass
	def tearDown(self):
		time.sleep(55)
		P.sql("delete from bind_list")
		time.sleep(5)
	def test_case68(self):
		#68
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd68")
		print a
		ret,val = P.s(P.r("testdata1", 0, "type68"),eval(a))
		print ret,val
		self.assertEqual(P.r("testdata1", 0, "ok68"),ret)
		print ret
		self.assertEqual(P.r("testdata1", 0, "act68"),val[0]['bak'])
		print val[0]['bak']
		self.assertEqual(P.r("testdata1", 0, "ret68"),val[0]['ret'])
		print val[0]['ret']
		self.assertEqual(P.r("testdata1",0,"database68"),P.u("54-76-D9-99"))
		print P.u("54-76-D9-99")
	def test_case69(self):
		#69
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		#P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd69")
		ret,val = P.s(P.r("testdata1", 0, "type69"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok69"),ret)
		self.assertEqual(P.r("testdata1", 0, "act69"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret69"),val[0]['ret'])

	def test_case71(self):
		#71
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 100001, 1, NULL)")
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 100001, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd71")
		ret,val = P.s(P.r("testdata1", 0, "type71"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok71"),ret)
		self.assertEqual(P.r("testdata1", 0, "act71"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret71"),val[0]['ret'])

	def test_case73(self):
		#73
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 100002, 1, NULL)")
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 100001, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd73")
		ret,val = P.s(P.r("testdata1", 0, "type73"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok73"),ret)
		self.assertEqual(P.r("testdata1", 0, "act73"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret73"),val[0]['ret'])

	def test_case74(self):
		#74
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 100001, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd74")
		ret,val = P.s(P.r("testdata1", 0, "type74"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok74"),ret)
		self.assertEqual(P.r("testdata1", 0, "act74"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret74"),val[0]['ret'])

	def test_case75(self):
		#75
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 100001, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd75")
		ret,val = P.s(P.r("testdata1", 0, "type75"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok75"),ret)
		self.assertEqual(P.r("testdata1", 0, "act75"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret75"),val[0]['ret'])

	def test_case76(self):
		#76
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-76-D9-99', 100001, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd76")
		ret,val = P.s(P.r("testdata1", 0, "type76"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok76"),ret)
		self.assertEqual(P.r("testdata1", 0, "act76"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret76"),val[0]['ret'])

	def test_case77(self):
		#77
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 2, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd77")
		ret,val = P.s(P.r("testdata1", 0, "type77"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok77"),ret)
		self.assertEqual(P.r("testdata1", 0, "act77"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret77"),val[0]['ret'])

	def test_case79(self):
		#79
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd79")
		ret,val = P.s(P.r("testdata1", 0, "type79"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok79"),ret)
		self.assertEqual(P.r("testdata1", 0, "act79"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret79"),val[0]['ret'])

	def test_case80(self):
		#80
		# P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd80")
		ret,val = P.s(P.r("testdata1", 0, "type80"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok80"),ret)
		self.assertEqual(P.r("testdata1", 0, "act80"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret80"),val[0]['ret'])

	def test_case81(self):
		#81
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd81")
		ret,val = P.s(P.r("testdata1", 0, "type81"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok81"),ret)
		self.assertEqual(P.r("testdata1", 0, "act81"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret81"),val[0]['ret'])

	def test_case82(self):
		#82
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd82")
		ret,val = P.s(P.r("testdata1", 0, "type82"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok82"),ret)
		self.assertEqual(P.r("testdata1", 0, "act82"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret82"),val[0]['ret'])

	def test_case83(self):
		#83
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd83")
		ret,val = P.s(P.r("testdata1", 0, "type83"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok83"),ret)
		self.assertEqual(P.r("testdata1", 0, "act83"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret83"),val[0]['ret'])

	def test_case84(self):
		#84
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd84")
		ret,val = P.s(P.r("testdata1", 0, "type84"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok84"),ret)
		self.assertEqual(P.r("testdata1", 0, "act84"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret84"),val[0]['ret'])

	def test_case85(self):
		#85
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd85")
		ret,val = P.s(P.r("testdata1", 0, "type85"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok85"),ret)
		self.assertEqual(P.r("testdata1", 0, "act85"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret85"),val[0]['ret'])

	def test_case86(self):
		#86
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd86")
		ret,val = P.s(P.r("testdata1", 0, "type86"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok86"),ret)
		self.assertEqual(P.r("testdata1", 0, "act86"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret86"),val[0]['ret'])

	def test_case87(self):
		#87
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd87")
		ret,val = P.s(P.r("testdata1", 0, "type87"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok87"),ret)
		self.assertEqual(P.r("testdata1", 0, "act87"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret87"),val[0]['ret'])

	def test_case88(self):
		#88
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd88")
		ret,val = P.s(P.r("testdata1", 0, "type88"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok88"),ret)
		self.assertEqual(P.r("testdata1", 0, "act88"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret88"),val[0]['ret'])

	def test_case89(self):
		#89
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd89")
		ret,val = P.s(P.r("testdata1", 0, "type89"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok89"),ret)
		self.assertEqual(P.r("testdata1", 0, "act89"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret89"),val[0]['ret'])

	def test_case90(self):
		#90
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd90")
		ret,val = P.s(P.r("testdata1", 0, "type90"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok90"),ret)
		self.assertEqual(P.r("testdata1", 0, "act90"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret90"),val[0]['ret'])

	def test_case91(self):
		#91
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd91")
		ret,val = P.s(P.r("testdata1", 0, "type91"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok91"),ret)
		self.assertEqual(P.r("testdata1", 0, "act91"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret91"),val[0]['ret'])

	def test_case92(self):
		#92
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 12345678, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd92")
		ret,val = P.s(P.r("testdata1", 0, "type92"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok92"),ret)
		self.assertEqual(P.r("testdata1", 0, "act92"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret92"),val[0]['ret'])

	def test_case93(self):
		#93
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd93")
		ret,val = P.s(P.r("testdata1", 0, "type93"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok93"),ret)
		self.assertEqual(P.r("testdata1", 0, "act93"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret93"),val[0]['ret'])

	def test_case94(self):
		#94
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd94")
		ret,val = P.s(P.r("testdata1", 0, "type94"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok94"),ret)
		self.assertEqual(P.r("testdata1", 0, "act94"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret94"),val[0]['ret'])

	def test_case95(self):
		#95
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd95")
		ret,val = P.s(P.r("testdata1", 0, "type95"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok95"),ret)
		self.assertEqual(P.r("testdata1", 0, "act95"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret95"),val[0]['ret'])

	def test_case96(self):
		#96
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd96")
		ret,val = P.s(P.r("testdata1", 0, "type96"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok96"),ret)
		self.assertEqual(P.r("testdata1", 0, "act96"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret96"),val[0]['ret'])

	def test_case97(self):
		#97
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd97")
		ret,val = P.s(P.r("testdata1", 0, "type97"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok97"),ret)
		self.assertEqual(P.r("testdata1", 0, "act97"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret97"),val[0]['ret'])

	def test_case98(self):
		#98
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd98")
		ret,val = P.s(P.r("testdata1", 0, "type98"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok98"),ret)
		self.assertEqual(P.r("testdata1", 0, "act98"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret98"),val[0]['ret'])

	def test_case99(self):
		#99
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd99")
		ret,val = P.s(P.r("testdata1", 0, "type99"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok99"),ret)
		self.assertEqual(P.r("testdata1", 0, "act99"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret99"),val[0]['ret'])

	def test_case100(self):
		#100
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd100")
		ret,val = P.s(P.r("testdata1", 0, "type100"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok100"),ret)
		self.assertEqual(P.r("testdata1", 0, "act100"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret100"),val[0]['ret'])

	def test_case101(self):
		#101
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd101")
		ret,val = P.s(P.r("testdata1", 0, "type101"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok101"),ret)
		self.assertEqual(P.r("testdata1", 0, "act101"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret101"),val[0]['ret'])

	def test_case102(self):
		#102
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		time.sleep(3)
		a =  P.r("testdata1", 0, "send_cmd102")
		ret,val = P.s(P.r("testdata1", 0, "type102"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok102"),ret)
		self.assertEqual(P.r("testdata1", 0, "act102"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret102"),val[0]['ret'])

class SALES_UPDATA_BUF(unittest.TestCase):
	def setUp(self):
		pass
	def tearDown(self):
		pass

class ESL_NETLINK(unittest.TestCase):   # ESL_NETLINK
	def setUp(self):
		# P.clearlog()
		pass

	def tearDown(self):
		time.sleep(50)

		server.send_cmd('ESL_NETLINK',[{"eslid":"54-72-C0-99", "nw1":"51-01-03-66",  "nw3":"158","op2":"5", "setchn":"158","grpchn":"158"}])
		time.sleep(30)

	def test_case262(self): #指定op2,setchn,grpchn
		id = '262'
		print '\n'+id

		P.sql("delete from bind_list")
		P.sql("delete from sales_list")
		time.sleep(3)
		P.sql("INSERT INTO bind_list('eslid', 'salesno', 'apid', 'status') VALUES ('54-72-C0-99', 1, 1, NULL)")
		P.sql("INSERT INTO sales_list('salesno', 'salesname', 'Price', 'oldprice', 'startdate', 'enddate', 'Price1', 'Price2', 'Price3', 'sid', 'lastworktime', 'status', 'barcode', 'origin', 'spec', 'location', 'unit', 'grade', 'position', 'exhibition', 'protype', 'qrcode', 'specifications', 'newtask', 'shelfposition', 'ROWID') VALUES (1, 'cadillac', '1940', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 16)")
		time.sleep(3)
		n = "158"

		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(20)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok262"),ret)
			self.assertEqual(P.r("testdata1", 0, "act262"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret262"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log262"))
			self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db262"))
			time.sleep(3)
		finally:
			P.u(id)

	def test_case263(self):#不指定op2,setchn,grpchn)
		id = '263'
		print '\n'+id
		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n}])

		time.sleep(30)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok263"),ret)
			self.assertEqual(P.r("testdata1", 0, "act263"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret263"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log263"))
			self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db263"))
		finally:
			time.sleep(3)
			P.u(id)

	def test_case264(self):#(不指定setchn)
		id = '264'
		print '\n'+id
		n = "178"
		s = "178"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5","grpchn":g}])
		time.sleep(50)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok264"),ret)
			self.assertEqual(P.r("testdata1", 0, "act264"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret264"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,"158",g),P.r("testdata1", 0, "log264"))
			self.assertEqual(P.incmpdb(esl,n,"158",g),P.r("testdata1", 0, "db264"))
		finally:
			P.u(id)

	def test_case265(self):#通过API接口,进行组网(不指定grpchn)
		id = '265'
		print '\n'+id
		n = "198"
		s = "198"
		g = "198"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5","setchn":s}])

		time.sleep(30)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok265"),ret)
			self.assertEqual(P.r("testdata1", 0, "act265"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret265"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,"158"),P.r("testdata1", 0, "log265"))


			self.assertEqual(P.incmpdb(esl,n,s,"158"),P.r("testdata1", 0, "db265"))
		finally:
			time.sleep(5)
			P.u(id)

	def test_case266(self):#(不指定op2)
		id = '266'
		print '\n'+id
		n = "178"
		s = "178"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"setchn":s, "grpchn":g}])

		time.sleep(30)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok266"),ret)
			self.assertEqual(P.r("testdata1", 0, "act266"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret266"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log266"))
			self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db266"))
		finally:
			time.sleep(5)
			P.u(id)
			time.sleep(100)

	def test_case267(self):#setchn,grpchn,nw3不同)
		id = '267'
		print '\n'+id
		n = "158"
		s = "168"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(30)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok267"),ret)
			self.assertEqual(P.r("testdata1", 0, "act267"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret267"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log267"))
			self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db267"))
		finally:
			time.sleep(5)
			P.u(id)
			time.sleep(100)

	def test_case268(self):#setchn,grpchn,nw3相同)
		id = "268"
		print '\n'+id
		n = "178"
		s = "178"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"setchn":s, "grpchn":g}])

		time.sleep(30)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok268"),ret)
		self.assertEqual(P.r("testdata1", 0, "act268"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret268"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log268"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db268"))
		time.sleep(30)
		P.u(id)

	def test_case269(self):#setchn=grpchn,nw3不同)
		id = '269'
		print '\n'+id
		n = "178"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(30)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok269"),ret)
		self.assertEqual(P.r("testdata1", 0, "act269"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret269"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log269"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db269"))
		time.sleep(30)
		P.u(id)

	def test_case270(self):#setchn,grpchn=nw3不同)
		id = '270'
		print '\n'+id
		n = "178"
		s = "158"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(40)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok270"),ret)
		self.assertEqual(P.r("testdata1", 0, "act270"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret270"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log270"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db270"))
		time.sleep(10)
		P.u(id)
		time.sleep(100)

	def test_case271(self):#setchn=nw3,grpchn不同)
		id = '271'
		print '\n'+id
		n = "198"
		s = "198"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(40)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok271"),ret)
		self.assertEqual(P.r("testdata1", 0, "act271"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret271"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log271"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db271"))
		time.sleep(30)
		P.u(id)
		time.sleep(100)

	def test_case272(self):#没有心跳的价签依然会保存在op6)
		# print "272"
		# n = "158"
		# s = "198"
		# g = "158"
		# esl = "54-72-C0-99"
		# nw1 = "51-01-03-66"
		# ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])
        #
		# time.sleep(30)
		# P.cs()
        #
		# self.assertEqual(P.r("testdata1", 0, "ok272"),ret)
		# self.assertEqual(P.r("testdata1", 0, "act272"),val[0]['bak'])
		# self.assertEqual(P.r("testdata1", 0, "ret272"),val[0]['ret'])
		# self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log272"))
		# self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db272"))
		# time.sleep(30)
		# server.send_cmd("SALES_UPDATA_BUF", [{"sid":"120", "salesno":"1", "Price":"1940", "Price1":"0", "Price2":"16257", "Price3":"3"}])
		pass

	def test_case273(self):#价签号不存在
		id = '273'
		print '\n'+id
		# a =  P.r("testdata1", 0, "send_cmd273")
		# ret,val = P.s(P.r("testdata1", 0, "type273"),eval(a))
		# self.assertEqual(P.r("testdata1", 0, "ok273"),ret)
		# self.assertEqual(P.r("testdata1", 0, "act273"),val[0]['bak'])
		# self.assertEqual(P.r("testdata1", 0, "ret273"),val[0]['ret'])

		n = "198"
		s = "198"
		g = "198"
		esl = "54-EF-EF-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n}])

		time.sleep(30)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok273"),ret)
		self.assertEqual(P.r("testdata1", 0, "act273"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret273"),val[0]['ret'])
		# self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log273"))
		# self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db273"))
		time.sleep(6)
		P.u(id)

	def test_case274(self): #必要字段缺失(nw3)
		id = '274'
		print '\n'+id
		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66"}])

		time.sleep(30)
		P.cs()

		self.assertEqual(P.r("testdata1", 0, "ok274"),ret)
		self.assertEqual(P.r("testdata1", 0, "act274"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret274"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log274"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db274"))
		time.sleep(30)
		P.u(id)

	def test_case275(self):#必要字段缺失(nw1)
		id = '275'
		print '\n'+id


		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw3":n}])

		time.sleep(60)
		P.cs()
		self.assertEqual(P.r("testdata1", 0, "ok275"),ret)
		self.assertEqual(P.r("testdata1", 0, "act275"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret275"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log275"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db275"))
		time.sleep(6)
		P.u(id)

	def test_case276(self):#必要字段缺失(eslid)
		id = '276'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd276")
		ret,val = P.s(P.r("testdata1", 0, "type276"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok276"),ret)
		self.assertEqual(P.r("testdata1", 0, "act276"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret276"),val[0]['ret'])
		time.sleep(5)
		P.u(id)

	def test_case277(self):#必要字段全部缺失,可选字段正常填写
		id = '277'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd277")
		ret,val = P.s(P.r("testdata1", 0, "type277"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok277"),ret)
		self.assertEqual(P.r("testdata1", 0, "act277"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret277"),val[0]['ret'])
		time.sleep(5)
		P.u(id)

	def test_case278(self):#必要字段与可选字段全部缺失
		id = '278'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd278")
		ret,val = P.s(P.r("testdata1", 0, "type278"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok278"),ret)
		self.assertEqual(P.r("testdata1", 0, "act278"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret278"),val[0]['ret'])
		time.sleep(5)
		P.u(id)

	def test_case279(self):# 输入价签号为空
		id = '279'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd279")
		ret,val = P.s(P.r("testdata1", 0, "type279"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok279"),ret)
		self.assertEqual(P.r("testdata1", 0, "act279"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret279"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case280(self):#价签号含字符
		id = '280'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd280")
		ret,val = P.s(P.r("testdata1", 0, "type280"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok280"),ret)
		self.assertEqual(P.r("testdata1", 0, "act280"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret280"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case281(self):#输入价签号中含空格

		id = '281'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd281")
		ret,val = P.s(P.r("testdata1", 0, "type281"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok281"),ret)
		self.assertEqual(P.r("testdata1", 0, "act281"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret281"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case282(self):#输入价签号中含Tab
		id = '282'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd282")
		ret,val = P.s(P.r("testdata1", 0, "type282"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok282"),ret)
		self.assertEqual(P.r("testdata1", 0, "act282"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret282"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case283(self):#输入价签号中含特殊字符(~!@#¥%……&*()<>? "" ' / \)

		id = '283'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd283")
		ret,val = P.s(P.r("testdata1", 0, "type283"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok283"),ret)
		self.assertEqual(P.r("testdata1", 0, "act283"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret283"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case284(self):#输入价签号为小数

		id = '284'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd284")
		ret,val = P.s(P.r("testdata1", 0, "type284"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok284"),ret)
		self.assertEqual(P.r("testdata1", 0, "act284"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret284"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case285(self):#输入价签号为负数

		id = '285'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd285")
		ret,val = P.s(P.r("testdata1", 0, "type285"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok285"),ret)
		self.assertEqual(P.r("testdata1", 0, "act285"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret285"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case286(self):#输入的价签号中不含“ - ”

		id = '286'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd286")
		ret,val = P.s(P.r("testdata1", 0, "type286"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok286"),ret)
		self.assertEqual(P.r("testdata1", 0, "act286"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret286"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case287(self):#输入价签号以非5开头
		id = '287'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd287")
		ret,val = P.s(P.r("testdata1", 0, "type287"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok287"),ret)
		self.assertEqual(P.r("testdata1", 0, "act287"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret287"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case288(self):#输入价签号"5-844-90-99"

		id = '288'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd288")
		ret,val = P.s(P.r("testdata1", 0, "type288"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok288"),ret)
		self.assertEqual(P.r("testdata1", 0, "act288"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret288"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case289(self):#输入价签号大小写组合
		id = '289'
		print '\n'+id
		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-bA-99"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-03-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(20)
		P.cs()
		self.assertEqual(P.r("testdata1", 0, "ok289"),ret)
		self.assertEqual(P.r("testdata1", 0, "act289"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret289"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log289"))
		self.assertEqual(P.incmpdb(esl.upper(),n,s,g),P.r("testdata1", 0, "db289"))
		time.sleep(3)
		P.u(id)

	def test_case290(self): #价签号的长度为254位
		id = '290'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd290")
		ret,val = P.s(P.r("testdata1", 0, "type290"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok290"),ret)
		self.assertEqual(P.r("testdata1", 0, "act290"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret290"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case291(self): #价签号的长度为255位
		id = '291'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd291")
		ret,val = P.s(P.r("testdata1", 0, "type291"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok291"),ret)
		self.assertEqual(P.r("testdata1", 0, "act291"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret291"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case292(self):#价签号的长度为255位
		id = '292'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd292")
		ret,val = P.s(P.r("testdata1", 0, "type292"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok292"),ret)
		self.assertEqual(P.r("testdata1", 0, "act292"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret292"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case293(self):#输入nw1为空

		id = '293'
		print '\n'+id
		# a =  P.r("testdata1", 0, "send_cmd293")
		# ret,val = P.s(P.r("testdata1", 0, "type293"),eval(a))
		# self.assertEqual(P.r("testdata1", 0, "ok293"),ret)
		# self.assertEqual(P.r("testdata1", 0, "act293"),val[0]['bak'])
		# self.assertEqual(P.r("testdata1", 0, "ret293"),val[0]['ret'])
		# time.sleep(3)
		# P.u(id)
		n = "178"
		s = "158"
		g = "178"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(40)
		P.cs()
		P.u(id)
		self.assertEqual(P.r("testdata1", 0, "ok293"),ret)
		self.assertEqual(P.r("testdata1", 0, "act293"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret293"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log293"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db293"))
		time.sleep(5)

	def test_case294(self):#输入nw1含字符(汉字or字母)
		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd294")
		ret,val = P.s(P.r("testdata1", 0, "type294"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok294"),ret)
		self.assertEqual(P.r("testdata1", 0, "act294"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret294"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case295(self):#输入nw1中含空格
		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd295")
		ret,val = P.s(P.r("testdata1", 0, "type295"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok295"),ret)
		self.assertEqual(P.r("testdata1", 0, "act295"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret295"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case296(self):#输入nw1中含Tab

		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd296")
		ret,val = P.s(P.r("testdata1", 0, "type296"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok296"),ret)
		self.assertEqual(P.r("testdata1", 0, "act296"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret296"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case297(self):#输入nw1中含特殊字符(~!@#¥%……&*()<>?)

		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd297")
		ret,val = P.s(P.r("testdata1", 0, "type297"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok297"),ret)
		self.assertEqual(P.r("testdata1", 0, "act297"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret297"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case298(self):#输入nw1结尾非66
		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd298")
		ret,val = P.s(P.r("testdata1", 0, "type298"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok298"),ret)
		self.assertEqual(P.r("testdata1", 0, "act298"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret298"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case299(self):#输入nw1以非5开头
		id = '294'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd299")
		ret,val = P.s(P.r("testdata1", 0, "type299"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok299"),ret)
		self.assertEqual(P.r("testdata1", 0, "act299"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret299"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case300(self):#输入nw1为小数
		id = '300'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd300")
		ret,val = P.s(P.r("testdata1", 0, "type300"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok300"),ret)
		self.assertEqual(P.r("testdata1", 0, "act300"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret300"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case301(self):#输入nw1为负数
		id = '301'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd301")
		ret,val = P.s(P.r("testdata1", 0, "type301"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok301"),ret)
		self.assertEqual(P.r("testdata1", 0, "act301"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret301"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case302(self):#输入的nw1中不含“ - ”

		id = '302'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd302")
		ret,val = P.s(P.r("testdata1", 0, "type302"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok302"),ret)
		self.assertEqual(P.r("testdata1", 0, "act302"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret302"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case303(self):#输入nw1为小写

		id = '303'
		print '\n'+id
		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":"51-01-0c-66",  "nw3":n,"op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(20)
		P.cs()
		try:
			self.assertEqual(P.r("testdata1", 0, "ok303"),ret)
			self.assertEqual(P.r("testdata1", 0, "act303"),val[0]['bak'])
			self.assertEqual(P.r("testdata1", 0, "ret303"),val[0]['ret'])
			self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log303"))
			self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db303"))
			time.sleep(3)
		finally:
			P.u(id)

	def test_case304(self):#输入一个nw1的长度为254位

		id = '304'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd304")
		ret,val = P.s(P.r("testdata1", 0, "type304"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok304"),ret)
		self.assertEqual(P.r("testdata1", 0, "act304"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret304"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case305(self):#输入一个nw1的长度为255位

		id = '305'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd305")
		ret,val = P.s(P.r("testdata1", 0, "type305"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok305"),ret)
		self.assertEqual(P.r("testdata1", 0, "act305"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret305"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case306(self):#输入一个nw1的长度为256位

		id = '306'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd306")
		ret,val = P.s(P.r("testdata1", 0, "type306"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok306"),ret)
		self.assertEqual(P.r("testdata1", 0, "act306"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret306"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case307(self):#输入nw3为空
		id = '307'
		print '\n'+id

		n = "158"
		s = "158"
		g = "158"
		esl = "54-72-C0-99"
		nw1 = "51-01-03-66"
		ret,val = server.send_cmd('ESL_NETLINK', [{"eslid":esl, "nw1":nw1,  "nw3":"","op2":"5", "setchn":s, "grpchn":g}])

		time.sleep(40)
		P.cs()
		P.u(id)
		self.assertEqual(P.r("testdata1", 0, "ok307"),ret)
		self.assertEqual(P.r("testdata1", 0, "act307"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret307"),val[0]['ret'])
		self.assertEqual(P.incmplog(n,s,g),P.r("testdata1", 0, "log307"))
		self.assertEqual(P.incmpdb(esl,n,s,g),P.r("testdata1", 0, "db307"))
		time.sleep(5)

	def test_case308(self):#输入nw3含字符(汉字or字母)
		id = '308'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd308")
		ret,val = P.s(P.r("testdata1", 0, "type308"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok308"),ret)
		self.assertEqual(P.r("testdata1", 0, "act308"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret308"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case309(self):#输入nw3中含空格
		id = '309'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd309")
		ret,val = P.s(P.r("testdata1", 0, "type309"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok309"),ret)
		self.assertEqual(P.r("testdata1", 0, "act309"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret309"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case310(self):#输入nw3中含Tab

		id = '310'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd310")
		ret,val = P.s(P.r("testdata1", 0, "type310"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok310"),ret)
		self.assertEqual(P.r("testdata1", 0, "act310"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret310"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case311(self):#输入nw3中含特殊字符(~!@#¥%……&*()<>?)

		id = '311'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd311")
		ret,val = P.s(P.r("testdata1", 0, "type311"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok311"),ret)
		self.assertEqual(P.r("testdata1", 0, "act311"),val[0]['bak'])
		self.assertEqual(P.r("testdata1", 0, "ret311"),val[0]['ret'])
		time.sleep(3)
		P.u(id)

	def test_case312(self):#输入nw3为小数

		id = '312'
		print '\n'+id
		a =  P.r("testdata1", 0, "send_cmd312")
		ret,val = P.s(P.r("testdata1", 0, "type312"),eval(a))
		self.assertEqual(P.r("testdata1", 0, "ok312"),ret)
		self.assertEqual(P.r("testdata1", 0, "act312"),val[0]['ba
				
公司 | 阅读 64260 次
文章评论,共0条
游客请输入验证码
浏览2354356次