-
Notifications
You must be signed in to change notification settings - Fork 58
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
Snow 1313805 fix connection test #972
Conversation
@contextmanager | ||
def set_env(env_name: str, value: str): | ||
os.environ[env_name] = value | ||
yield | ||
del os.environ[env_name] |
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.
Why not use mock.patch.dict(os.environ)
?
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.
Fixed in #971
ba4c344
to
3203d36
Compare
tests/test_connection.py
Outdated
mock.call(object_type=ObjectType.ROLE, name=f'"{conn.role}"'), | ||
mock.call(object_type=ObjectType.DATABASE, name=f'"{conn.database}"'), | ||
mock.call(object_type=ObjectType.SCHEMA, name=f'"{conn.schema}"'), | ||
mock.call(object_type=ObjectType.WAREHOUSE, name=f'"{conn.warehouse}"'), |
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.
How it was passing previously?
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.
It wasn't :] - fized in #971
* fix schema override in connections test
Pre-review checklist
Changes description
Fix overriding "schema" parameter in
snow connection test