From af5793ac4f3a0ff63272b8a47da10346fa5d70c5 Mon Sep 17 00:00:00 2001 From: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:41:49 -0500 Subject: [PATCH] chore(nimbus): fix get_metric_areas intermittent coverage failure Because * We recently discovered an intermittent coverage failure in get_metric_areas * We fixed it by specifying an outcome in the test factory to trigger the uncovered lines * We forgot to also affix the application since that determines which outcomes to use This commit * Affixes both the application and outcome to trigger the uncovered lines fixes #14163 --- experimenter/experimenter/experiments/tests/test_models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/experimenter/experimenter/experiments/tests/test_models.py b/experimenter/experimenter/experiments/tests/test_models.py index 91a1fb9793..5d7307007a 100644 --- a/experimenter/experimenter/experiments/tests/test_models.py +++ b/experimenter/experimenter/experiments/tests/test_models.py @@ -2367,8 +2367,10 @@ def test_get_branch_data_returns_correct_data(self): @mock_valid_outcomes def test_get_metric_data_returns_correct_data(self): - outcomes = Outcomes.all() + application = NimbusExperiment.Application.DESKTOP + outcomes = Outcomes.by_application(application) experiment = NimbusExperimentFactory.create( + application=NimbusExperiment.Application.DESKTOP, primary_outcomes=[outcomes[0].slug], ) branch_a = NimbusBranchFactory.create(