Skip to content

chore(tests): added integrated tests#44

Merged
petruki merged 1 commit intomasterfrom
staging
Mar 29, 2026
Merged

chore(tests): added integrated tests#44
petruki merged 1 commit intomasterfrom
staging

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented Mar 29, 2026

This pull request introduces environment variable support for API keys using python-dotenv, and adds new integration tests for the Switcher client. The main changes include updating dependencies, refactoring test setup to use environment variables, and implementing integration tests that interact with the remote API.

Environment variable and dependency updates:

  • Added python-dotenv to the Pipfile to enable loading environment variables from a .env file.
  • Updated test setup in tests/playground/index.py to load the API key from the environment using dotenv, replacing the hardcoded value with os.getenv('SWITCHER_API_KEY').

Testing improvements:

  • Added a new file tests/test_switcher_integration.py with integration tests for key Switcher client functionalities, including API calls, snapshot loading, and switcher availability checks. These tests use the API key from the environment and skip execution if it is not set.
  • Changed the default test use case in tests/playground/index.py to use uc_simple_api_call() instead of uc_watch_snapshot().

@petruki petruki self-assigned this Mar 29, 2026
@petruki petruki added the documentation Improvements or additions to documentation label Mar 29, 2026
@sonarqubecloud
Copy link
Copy Markdown

@petruki petruki merged commit cb6208e into master Mar 29, 2026
15 checks passed
@petruki petruki deleted the staging branch March 29, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant