예제 #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
파일: debug.py 프로젝트: imhuwq/oss-command
from oss_command.entrypoint import main

if __name__ == '__main__':
    main()