Пример #1
0
def test_download_invalid_parameter():
    with pytest.raises(SystemExit):
        main()
        assert os.path.exists(tmp_file)
        os.remove(tmp_file)
Пример #2
0
def test_copy_invalid_parameter():
    with pytest.raises(SystemExit):
        main()
        delete_from_oss(oss_endpoint, tmp_file)
Пример #3
0
def test_download():
    main()
    assert os.path.exists(tmp_file)
    os.remove(tmp_file)
Пример #4
0
def test_delete_invalid_parameter():
    with pytest.raises(SystemExit):
        main()
Пример #5
0
def test_copy():
    main()
    delete_from_oss(oss_endpoint, tmp_file)
Пример #6
0
def test_exist_failed():
    with pytest.raises(SystemExit):
        main()
Пример #7
0
def test_delete():
    upload_to_oss(cur_file, oss_endpoint, tmp_file)
    main()
Пример #8
0
def test_upload_invalid_parameter():
    with pytest.raises(SystemExit):
        main()
Пример #9
0
def test_exist():
    main()
Пример #10
0
def test_upload():
    main()
    delete_from_oss(oss_endpoint, tmp_file)
Пример #11
0
def test_config():
    main()
Пример #12
0
def test_help():
    with pytest.raises(SystemExit):
        main()
Пример #13
0
def test_command_fail_will_result_abnormal_exit():
    with pytest.raises(SystemExit):
        main()
Пример #14
0
from oss_command.entrypoint import main

if __name__ == '__main__':
    main()