vproc_testcase.py 1.13 KB

import os

print("--------------------testcase write value-------------------")
res = os.popen("python vproc write --key=vaserver.va0.cameraname --value=name1").read();
print(res)

print("--------------------testcase read value-------------------")
res = os.popen("python vproc read --key=vaserver.va0.cameraname").read();
print(res)

print("--------------------testcase help, shoud print 3 times-------------------")
res = os.popen("python vproc --help").read();
print(res)

res = os.popen("python vproc read").read();
print(res)

res = os.popen("python vproc").read();
print(res)

print("--------------------testcase read value, shoud print null-------------------")
res = os.popen("python vproc read --key=vaserver.lalalal").read();
print(res)

print("--------------------testcase read value, shoud print invalid args 2 times-------------------")
res = os.popen("python vproc write --key=vaserver --value=123").read();
print(res)

res = os.popen("python vproc write --key=vaserver.fffff ").read();
print(res)

print("--------------------testcase remove items-------------------")
res = os.popen("python vproc clean --path=vaserver.va0 ").read();
print(res)