'This function builds a method that runs the CanonicalID
test for the given set of inputs'

def mkTest(iname, filename, expectedID):

    filename = datapath(filename)
    def test(self):
        xrds = etxrd.parseXRDS(file(filename).read())
        self._getCanonicalID(iname, xrds, expectedID)
    return test
