Esempio n. 1
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"]
Esempio n. 2
0
    def test_c_mark(self):
        add(self.bangumi_name_1, 0)

        r = mark(self.bangumi_name_1, 1)
        assert r["status"] == "success", r["message"]
        r = mark(self.bangumi_name_1, None)
        assert r["status"] == "info", r["message"]
        r = mark(self.bangumi_name_2, 0)
        assert r["status"] == "error", r["message"]
Esempio n. 3
0
def add_wrapper(ret):
    for bangumi_name in ret.name:
        result = add(name=bangumi_name, episode=ret.episode)
        globals()["print_{}".format(result['status'])](result['message'])
Esempio n. 4
0
File: cli.py Progetto: RicterZ/BGmi
def add_wrapper(ret):
    for bangumi_name in ret.name:
        result = add(name=bangumi_name, episode=ret.episode)
        globals()["print_{}".format(result['status'])](result['message'])
Esempio n. 5
0
def add_wrapper(ret: Any) -> None:
    for bangumi_name in ret.name:
        result = add(name=bangumi_name, episode=ret.episode)
        globals()["print_{}".format(result["status"])](result["message"])