From 1d054a1876137e71a1c8203a2f0f1a20cdfd518c Mon Sep 17 00:00:00 2001 From: DanielRyanSmith Date: Thu, 16 Jan 2025 22:07:11 +0000 Subject: [PATCH] fix use counter reference variable --- framework/origin_trials_client.py | 4 ++-- framework/origin_trials_client_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/origin_trials_client.py b/framework/origin_trials_client.py index 65d4c3ca0ee5..b1780eb7a01b 100644 --- a/framework/origin_trials_client.py +++ b/framework/origin_trials_client.py @@ -189,8 +189,8 @@ def _send_create_trial_request( 'bucket_number': ot_stage.ot_use_counter_bucket_number, 'histogram_id': BlinkHistogramID.web_feature.value } - if (ot_stage.ot_chromium_trial_name - and ot_stage.ot_chromium_trial_name.startswith('WebDXFeature::')): + if (ot_stage.ot_webfeature_use_counter + and ot_stage.ot_webfeature_use_counter.startswith('WebDXFeature::')): config['histogram_id'] = BlinkHistogramID.webdx_feature.value json['trial']['blink_use_counter_config'] = config diff --git a/framework/origin_trials_client_test.py b/framework/origin_trials_client_test.py index ef7732f7d20c..929b43cdf500 100644 --- a/framework/origin_trials_client_test.py +++ b/framework/origin_trials_client_test.py @@ -269,7 +269,7 @@ def test_create_origin_trial__webdx_feature( self, mock_requests_post, mock_get_trial_end_time, mock_get_ot_access_token, mock_api_key_get, mock_get_admin_group): """WebDXFeature use counters should have different config in request.""" - self.ot_stage.ot_chromium_trial_name = 'WebDXFeature::Example' + self.ot_stage.ot_webfeature_use_counter = 'WebDXFeature::Example' self.ot_stage.put() mock_requests_post.return_value = mock.MagicMock( status_code=200, json=lambda : (