예제 #1
0
파일: cli.py 프로젝트: terry0824/BGmi
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'])
예제 #2
0
파일: cli.py 프로젝트: RicterZ/BGmi
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'])
예제 #3
0
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"])
예제 #4
0
 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"]
예제 #5
0
 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"]