def test_convert_datascrubbing_config(): cfg = sentry_relay.convert_datascrubbing_config( { "scrubData": True, "excludeFields": [], "scrubIpAddresses": True, "sensitiveFields": [], "scrubDefaults": True, } ) assert cfg["applications"] assert ( sentry_relay.convert_datascrubbing_config( { "scrubData": False, "excludeFields": [], "scrubIpAddresses": False, "sensitiveFields": [], "scrubDefaults": False, } ) == {} )
def get_all_pii_configs(project): # Note: This logic is duplicated in Relay store. pii_config = get_pii_config(project) if pii_config: yield pii_config yield sentry_relay.convert_datascrubbing_config(get_datascrubbing_settings(project))
def get_all_pii_configs(project_config): # Note: This logic is duplicated in Relay store. pii_config = project_config.config["piiConfig"] if pii_config: yield pii_config yield sentry_relay.convert_datascrubbing_config(project_config.config["datascrubbingSettings"])