fix(sdk): BUG-015 validate URL in capture() when using ScreenshotOptions
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m14s
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m14s
- Add URL validation after options.to_dict() in Python SDK - Add failing test first (TDD), then fix - All 17 Python SDK tests passing
This commit is contained in:
parent
dfd410f842
commit
195a656a7d
5 changed files with 8 additions and 2 deletions
BIN
sdk/python/src/snapapi/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
sdk/python/src/snapapi/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
sdk/python/src/snapapi/__pycache__/client.cpython-312.pyc
Normal file
BIN
sdk/python/src/snapapi/__pycache__/client.cpython-312.pyc
Normal file
Binary file not shown.
|
|
@ -144,6 +144,8 @@ class SnapAPI:
|
|||
"""
|
||||
if options:
|
||||
body = options.to_dict()
|
||||
if not body.get('url'):
|
||||
raise ValueError("url is required")
|
||||
else:
|
||||
if not url:
|
||||
raise ValueError("url is required")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue