Skip to content

Do not override API parameters with default when calling initialize if they are already set#386

Merged
zippolyte merged 2 commits intomasterfrom
hippo/initialize
Jun 4, 2019
Merged

Do not override API parameters with default when calling initialize if they are already set#386
zippolyte merged 2 commits intomasterfrom
hippo/initialize

Conversation

@zippolyte
Copy link
Copy Markdown
Contributor

@zippolyte zippolyte commented Jun 4, 2019

Resolves #369

del os.environ["DATADOG_APP_KEY"]
del os.environ["DATADOG_HOST"]

def test_function_param_value(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a quick test that tests the order these are used? Like provided attribute >> existing attribute >> environment variable?

@nmuesch nmuesch self-assigned this Jun 4, 2019
Copy link
Copy Markdown
Contributor

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice tests too! 🚀

@zippolyte zippolyte merged commit 3585995 into master Jun 4, 2019
@zippolyte zippolyte deleted the hippo/initialize branch June 4, 2019 15:03
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Oct 25, 2019
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling datadog.initialize >1 times can be destructive

2 participants