Skip to content

Commit

Permalink
reserved name package upload test case
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Jan 19, 2024
1 parent 4763bc6 commit b2b2665
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from reserver import Uploader
import os
test_pypi_token = os.environ.get("TEST_PYPI_PASSWORD")

def test():

# test reserved name
uploader = Uploader(test_pypi_token, is_test_pypi_account= True)
uploader.upload_to_pypi("numpy")

# test not reserved name -> correct credentials
# uploader = Uploader(test_pypi_token, is_test_pypi_account= True)
# uploader.upload_to_pypi(get_random_name())

# test not reserved name -> wrong credentials
# wrong_pypi_token = "pypi-wrong-api-token"
# uploader = Uploader(wrong_pypi_token, is_test_pypi_account= True)
# uploader.upload_to_pypi(get_random_name())

0 comments on commit b2b2665

Please sign in to comment.