def resourceSearchTests(pf):
    try:
       # try out isChild with a non-child resource
       p = Resource("eddie","atype")
       c = Resource("franks|schild","atype|btype")
       theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
Beispiel #2
0
def resourceSearchTests(pf):
    try:
        # try out isChild with a non-child resource
        p = Resource("eddie", "atype")
        c = Resource("franks|schild", "atype|btype")
        theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
       theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
    except:
       pf.failed("non-PTexception when try isChild non-child resource")
    else:
       if theVerdict == True:
          pf.failed("isChild fail with non-child resource")
       else:
          pf.passed("isChild pass with non-child resource")

    try:
       # try out isChild
       p = Resource("eddie","atype")
       c = Resource("eddie","atype")
       theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
    except:
       pf.failed("non-PTexception when try isChild same name resource")
    else:
       if theVerdict == True:
          pf.failed("isChild fail same name resource")
       else:
          pf.passed("isChild pass same name resource")

    try:
       # try out isChild
       p = Resource("eddie","atype")
       c = Resource("eddie|schild","atype|btype")
       theVerdict = p.isChild(c)
Beispiel #4
0
        theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
    except:
        pf.failed("non-PTexception when try isChild non-child resource")
    else:
        if theVerdict == True:
            pf.failed("isChild fail with non-child resource")
        else:
            pf.passed("isChild pass with non-child resource")

    try:
        # try out isChild
        p = Resource("eddie", "atype")
        c = Resource("eddie", "atype")
        theVerdict = p.isChild(c)
    except PTexception, a:
        pf.failed(a.value)
    except:
        pf.failed("non-PTexception when try isChild same name resource")
    else:
        if theVerdict == True:
            pf.failed("isChild fail same name resource")
        else:
            pf.passed("isChild pass same name resource")

    try:
        # try out isChild
        p = Resource("eddie", "atype")
        c = Resource("eddie|schild", "atype|btype")
        theVerdict = p.isChild(c)