Skip to content

Commit

Permalink
Add tests for newrelic/config.py (#860)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
hmstepanek and mergify[bot] committed Jun 30, 2023
1 parent 3bdb013 commit 6644846
Show file tree
Hide file tree
Showing 2 changed files with 411 additions and 3 deletions.
19 changes: 18 additions & 1 deletion newrelic/config.py
Expand Up @@ -102,6 +102,14 @@

_cache_object = []


def _reset_config_parser():
global _config_object
global _cache_object
_config_object = ConfigParser.RawConfigParser()
_cache_object = []


# Mechanism for extracting settings from the configuration for use in
# instrumentation modules and extensions.

Expand Down Expand Up @@ -550,6 +558,11 @@ def _process_configuration(section):
_configuration_done = False


def _reset_configuration_done():
global _configuration_done
_configuration_done = False


def _process_app_name_setting():
# Do special processing to handle the case where the application
# name was actually a semicolon separated list of names. In this
Expand Down Expand Up @@ -1238,7 +1251,6 @@ def _process_wsgi_application_configuration():
for section in _config_object.sections():
if not section.startswith("wsgi-application:"):
continue

enabled = False

try:
Expand Down Expand Up @@ -3106,6 +3118,11 @@ def _process_module_entry_points():
_instrumentation_done = False


def _reset_instrumentation_done():
global _instrumentation_done
_instrumentation_done = False


def _setup_instrumentation():
global _instrumentation_done

Expand Down

0 comments on commit 6644846

Please sign in to comment.