示例#1
0
def T_02_getMacByBarCode_A(product):
    u'''根据单板条码查询MACID-根据单板条码查询MACID'''
    sb = ServerBusiness()
    sb.__enter__()
    try:
        mac = sb.getProductIdByBarCode(
            productName="GS11 OBU",
            suiteName="单板测试",
            barCode=product.getTestingSuiteBarCode())
    except ServerBusiness.NormalException, e:
        raise AbortTestException(message=u"没有此单板的测试结果")
示例#2
0
 def procFun():
     try:
         sb = ServerBusiness()
         sb.__enter__()
         status = sb.getProductTestStatus(productName=u"GS15 超高频标签",
                                          idCode=tid)
     except:
         status = None
     if status is not None:
         LOCAL_DUPLICATE_TID_SET.add(tid)
         raise AbortTestException(message=u"被测卡片TID:%s与已测试记录重复,测试失败" %
                                  tid)
     else:
         uiLog(u"被测卡片TID:%s检测不重复" % tid)
示例#3
0
def __checkTestResult(barCode):
    '''检查该条码的卡片是否经过了测试'''
    sb = ServerBusiness()
    sb.__enter__()
    try:
        idCode = sb.getProductIdByBindingCode(productName=u"GS15 超高频标签", codeName=u"条码", code=barCode)
        if idCode == None:
            return False
        status = sb.getProductTestStatus(productName=u"GS15 超高频标签" , idCode=idCode)
        if status is None:
            return False
        if OVERALL_SUITE_NAME not in status["suiteStatus"] or status["suiteStatus"][OVERALL_SUITE_NAME] != 'PASS':
            return False
        return True
    except:
        return False