'Checks that conversion to json and back is idempotent.'

def assertBackAndForth(self, obj):

    jsonable = thrift2json(obj)
    back = jsonable2thrift(jsonable, type(obj))
    self.assertEquals(obj, back)
