from assert_method import assertclass


def getmethod(p,result):
    code = result.status_code
    if code == 200:
        res = result.json()
        print(p + str(res))
        error_code = res.get("error")
        assertclass.error_code(error_code, p)
        assertclass.runtime(result, p)
    else:
        assertclass.statuecode(code, p)