-
Notifications
You must be signed in to change notification settings - Fork 7
APP-6435: Added support for vcrpy
test utilities to mock HTTP
interactions with 3rd-party APIs
#612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for vcrpy test utilities to mock HTTP interactions in tests by introducing a new BaseVCR class and related serializers, along with an error class for handling missing dependencies.
- Introduces DependencyNotFoundError in utils.py to provide a clear message when required dependencies are missing.
- Adds BaseVCR and its supporting serializers (for pretty-printing YAML and JSON bodies) along with utilities to clean headers in test_utils/base_vcr.py.
- Updates copyright information in test_utils/init.py.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pyatlan/utils.py | Adds DependencyNotFoundError for better dependency handling. |
pyatlan/test_utils/base_vcr.py | Implements the BaseVCR class with custom serializers and header filtering. |
pyatlan/test_utils/init.py | Updates copyright year to 2025. |
Files not reviewed (1)
- requirements-dev.txt: Language not supported
86c0562
to
f5075aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for vcrpy test utilities to mock HTTP interactions with third-party APIs. Key changes include:
- Introducing the BaseVCR class with custom JSON and YAML serializers and pytest fixtures for VCR configuration.
- Updating copyright notices in test_utils.
- Adding the DependencyNotFoundError exception to handle missing dependencies.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
pyatlan/test_utils/base_vcr.py | Implements VCR support with custom serializers and fixtures. |
pyatlan/test_utils/init.py | Updates the copyright year to 2025. |
pyatlan/errors.py | Adds the DependencyNotFoundError for missing dependencies. |
Files not reviewed (1)
- requirements-dev.txt: Language not supported
…eractions with 3rd-party `APIs`
…ues with `py 3.8` and `py 3.9` versions
…onfigurations - Introduced integration tests using VCR for recording and replaying HTTP interactions with JSON and YAML formats. - Applied class-specific VCR configurations to handle both JSON and YAML serializers for different test scenarios.
27c79e4
to
881005d
Compare
TODOs
vcr
to demonstrate HTTP interaction recording and playback.Sample snippet: