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

if __name__ == '__main__':
    main()