|
34 | 34 | "category": "us-cloud", |
35 | 35 | "classification_confidence": 95.0, |
36 | 36 | "classification_signals": [ |
37 | | - {"kind": "mx", "provider": "microsoft", "weight": 0.2, "detail": "mx match"}, |
38 | | - {"kind": "spf", "provider": "microsoft", "weight": 0.2, "detail": "spf match"}, |
39 | | - {"kind": "autodiscover", "provider": "microsoft", "weight": 0.08, "detail": "ad match"}, |
| 37 | + { |
| 38 | + "kind": "mx", |
| 39 | + "provider": "microsoft", |
| 40 | + "weight": 0.2, |
| 41 | + "detail": "mx match", |
| 42 | + }, |
| 43 | + { |
| 44 | + "kind": "spf", |
| 45 | + "provider": "microsoft", |
| 46 | + "weight": 0.2, |
| 47 | + "detail": "spf match", |
| 48 | + }, |
| 49 | + { |
| 50 | + "kind": "autodiscover", |
| 51 | + "provider": "microsoft", |
| 52 | + "weight": 0.08, |
| 53 | + "detail": "ad match", |
| 54 | + }, |
40 | 55 | ], |
41 | 56 | "mx": ["mail.protection.outlook.com"], |
42 | 57 | "spf": "v=spf1 include:spf.protection.outlook.com -all", |
|
51 | 66 | "category": "swiss-based", |
52 | 67 | "classification_confidence": 90.0, |
53 | 68 | "classification_signals": [ |
54 | | - {"kind": "mx", "provider": "independent", "weight": 0.2, "detail": "mx match"}, |
55 | | - {"kind": "spf", "provider": "independent", "weight": 0.2, "detail": "spf match"}, |
| 69 | + { |
| 70 | + "kind": "mx", |
| 71 | + "provider": "independent", |
| 72 | + "weight": 0.2, |
| 73 | + "detail": "mx match", |
| 74 | + }, |
| 75 | + { |
| 76 | + "kind": "spf", |
| 77 | + "provider": "independent", |
| 78 | + "weight": 0.2, |
| 79 | + "detail": "spf match", |
| 80 | + }, |
56 | 81 | ], |
57 | 82 | "mx": ["mail.bern.ch"], |
58 | 83 | "spf": "v=spf1 a mx -all", |
|
67 | 92 | "category": "swiss-based", |
68 | 93 | "classification_confidence": 50.0, |
69 | 94 | "classification_signals": [ |
70 | | - {"kind": "spf", "provider": "infomaniak", "weight": 0.2, "detail": "spf match"}, |
| 95 | + { |
| 96 | + "kind": "spf", |
| 97 | + "provider": "infomaniak", |
| 98 | + "weight": 0.2, |
| 99 | + "detail": "spf match", |
| 100 | + }, |
71 | 101 | ], |
72 | 102 | "mx": ["mxpool.infomaniak.com"], |
73 | 103 | "spf": "v=spf1 include:spf.infomaniak.ch -all", |
|
82 | 112 | "category": "swiss-based", |
83 | 113 | "classification_confidence": 55.0, |
84 | 114 | "classification_signals": [ |
85 | | - {"kind": "spf", "provider": "infomaniak", "weight": 0.2, "detail": "spf match"}, |
86 | | - {"kind": "mx", "provider": "microsoft", "weight": 0.2, "detail": "mx conflict"}, |
| 115 | + { |
| 116 | + "kind": "spf", |
| 117 | + "provider": "infomaniak", |
| 118 | + "weight": 0.2, |
| 119 | + "detail": "spf match", |
| 120 | + }, |
| 121 | + { |
| 122 | + "kind": "mx", |
| 123 | + "provider": "microsoft", |
| 124 | + "weight": 0.2, |
| 125 | + "detail": "mx conflict", |
| 126 | + }, |
87 | 127 | ], |
88 | 128 | "mx": ["mxpool.infomaniak.com"], |
89 | 129 | "spf": "v=spf1 include:spf.infomaniak.ch -all", |
@@ -201,7 +241,9 @@ def test_report_low_confidence(capsys: pytest.CaptureFixture[str]) -> None: |
201 | 241 | assert "Conflicting primary" in out |
202 | 242 |
|
203 | 243 |
|
204 | | -def test_report_low_confidence_shows_conflicts(capsys: pytest.CaptureFixture[str]) -> None: |
| 244 | +def test_report_low_confidence_shows_conflicts( |
| 245 | + capsys: pytest.CaptureFixture[str], |
| 246 | +) -> None: |
205 | 247 | report_low_confidence(_MUNIS) |
206 | 248 | out = capsys.readouterr().out |
207 | 249 | # muni 4 has mx pointing to microsoft but winner is infomaniak |
@@ -235,7 +277,9 @@ def test_main(capsys: pytest.CaptureFixture[str], tmp_path: Path) -> None: |
235 | 277 | # --------------------------------------------------------------------------- |
236 | 278 |
|
237 | 279 |
|
238 | | -def test_no_color_env(capsys: pytest.CaptureFixture[str], monkeypatch: pytest.MonkeyPatch) -> None: |
| 280 | +def test_no_color_env( |
| 281 | + capsys: pytest.CaptureFixture[str], monkeypatch: pytest.MonkeyPatch |
| 282 | +) -> None: |
239 | 283 | """When NO_COLOR is set, output must not contain ANSI escape codes.""" |
240 | 284 | monkeypatch.setenv("NO_COLOR", "1") |
241 | 285 | # Re-import to pick up env var change -- instead just test the _c helper |
|
0 commit comments