Beispiel #1
0
def test_file_callback():  # type: () -> None
    d = {}

    def noop(token, *args, **kwargs):
        d["token"] = token

    f = File("xxx", io.BytesIO(b"xxx"))
    f._save_to_s3 = noop
    f._save_to_qiniu = noop
    f._save_to_qcloud = noop
    f.save()
    f._save_callback(d["token"], False)
Beispiel #2
0
def test_file_callback():  # type: () -> None
    d = {}

    def noop(token, *args, **kwargs):
        d['token'] = token

    f = File('xxx', io.BytesIO(b'xxx'))
    f._save_to_s3 = noop
    f._save_to_qiniu = noop
    f._save_to_qcloud = noop
    f.save()
    f._save_callback(d['token'], False)
Beispiel #3
0
def test_file_callback():  # type: () -> None
    d = {}

    def noop(token, *args, **kwargs):
        d['token'] = token

    f = File('xxx', io.BytesIO(b'xxx'))
    f._save_to_s3 = noop
    f._save_to_qiniu = noop
    f._save_to_qcloud = noop
    f.save()
    f._save_callback(d['token'], False)