From b2b2665fbd23401b0354650982c62b619bb797ee Mon Sep 17 00:00:00 2001 From: AHReccese Date: Sat, 20 Jan 2024 00:21:11 +0330 Subject: [PATCH] reserved name package upload test case --- test/test.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test.py diff --git a/test/test.py b/test/test.py new file mode 100644 index 0000000..eeaec3e --- /dev/null +++ b/test/test.py @@ -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())