diff --git a/crypto_seller/secrets_config.py b/crypto_seller/secrets_config.py index fa44d7e..06149d4 100644 --- a/crypto_seller/secrets_config.py +++ b/crypto_seller/secrets_config.py @@ -2,7 +2,11 @@ from secret_loader import SecretLoader -__all__ = ['KUCOIN_KEY', 'KUCOIN_SECRET', 'KUCOIN_PASS'] +__all__ = [ + 'KUCOIN_KEY', + 'KUCOIN_PASS', + 'KUCOIN_SECRET', +] secret_loader = SecretLoader() diff --git a/test/test_init.py b/test/test_init.py new file mode 100644 index 0000000..db59578 --- /dev/null +++ b/test/test_init.py @@ -0,0 +1,2 @@ +def test_init_main(): + import crypto_seller.__main__ # noqa: F401 diff --git a/test/test_secrets.py b/test/test_secrets.py index 1c5b2dc..ec7077f 100644 --- a/test/test_secrets.py +++ b/test/test_secrets.py @@ -1,7 +1,6 @@ +import pytest + + def test_secrets(): - try: - import crypto_seller.secrets_config - except ModuleNotFoundError: - raise - except: - pass + with pytest.raises(ValueError, match='Failed to load secret with key:.*'): + import crypto_seller.secrets_config # noqa: F401