From f8c047fbede6461096655e6606d600c2590faf7a Mon Sep 17 00:00:00 2001 From: AHReccese Date: Sat, 20 Jan 2024 13:54:41 +0330 Subject: [PATCH] update test files --- test/test.py | 18 ------------------ tests/test_reserver.py | 9 +++++++++ 2 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 test/test.py create mode 100644 tests/test_reserver.py diff --git a/test/test.py b/test/test.py deleted file mode 100644 index eeaec3e..0000000 --- a/test/test.py +++ /dev/null @@ -1,18 +0,0 @@ -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()) diff --git a/tests/test_reserver.py b/tests/test_reserver.py new file mode 100644 index 0000000..f4ba8a7 --- /dev/null +++ b/tests/test_reserver.py @@ -0,0 +1,9 @@ +from reserver import Uploader +import os +test_pypi_token = os.environ.get("TEST_PYPI_PASSWORD") + +def test_reserver(): + + # test reserved name + uploader = Uploader(test_pypi_token, is_test_pypi_account= True) + uploader.upload_to_pypi("numpy")