Kill the surviving mutants of the e2e command's settings, sandbox and entry point

This commit is contained in:
2026-11-19 03:53:14 +01:00
parent 68d7a31920
commit b709e03023
6 changed files with 115 additions and 30 deletions
+6 -2
View File
@@ -5,7 +5,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2]))
from do_epic.e2e.settings import ENV_FILE, JIRA_URL, PROJECT, read, Sandbox
from do_epic.e2e.settings import ENV_FILE, JIRA_URL, MEANING, PROJECT, read, Sandbox
from failure import Failure
@@ -33,7 +33,11 @@ class SettingsTest(unittest.TestCase):
self.assertNotIn(PROJECT, self.failure({k: v for k, v in self.env.items() if k != JIRA_URL}))
def test_treats_a_blank_setting_as_missing(self) -> None:
self.assertIn(ENV_FILE, self.failure({**self.env, ENV_FILE: " "}))
self.assertEqual(self.failure({**self.env, ENV_FILE: " "}), f"{ENV_FILE} is missing: set it to {MEANING[ENV_FILE]}")
def test_names_every_fault_at_once_separated_by_semicolons(self) -> None:
self.env_file.chmod(0o644)
self.assertEqual(self.failure({**self.env, PROJECT: "sbx-1"}), f"{PROJECT} is 'sbx-1', not a project key such as SBX; {self.env_file} holds an API token, so only its owner may read it; run chmod 600 {self.env_file}")
def test_refuses_a_site_that_is_not_an_https_address_without_a_path(self) -> None:
self.assertIn(JIRA_URL, self.failure({**self.env, JIRA_URL: "http://acme.atlassian.net/jira"}))