def delete_wrapper(ret): if ret.clear_all: delete('', clear_all=ret.clear_all, batch=ret.batch) else: for bangumi_name in ret.name: result = delete(name=bangumi_name) globals()["print_{}".format(result['status'])](result['message'])
def delete_wrapper(ret: Any) -> None: if ret.clear_all: delete("", clear_all=ret.clear_all, batch=ret.batch) else: for bangumi_name in ret.name: result = delete(name=bangumi_name) globals()["print_{}".format(result["status"])](result["message"])
def test_d_delete(self): r = delete() assert r["status"] == "warning", r["message"] r = delete(self.bangumi_name_1) assert r["status"] == "warning", r["message"] r = delete(self.bangumi_name_1) assert r["status"] == "warning", r["message"] r = delete(self.bangumi_name_2) assert r["status"] == "error", r["message"] r = delete(clear_all=True, batch=True) assert r["status"] == "warning", r["message"]
def test_b_add(self): r = add(self.bangumi_name_1, 0) assert r["status"] == "success", r["message"] r = add(self.bangumi_name_1, 0) assert r["status"] == "warning", r["message"] r = delete(self.bangumi_name_1) assert r["status"] == "warning", r["message"]