Skip to content

Commit 6346c71

Browse files
committed
tests cleanup
1 parent 4d4cca9 commit 6346c71

2 files changed

Lines changed: 0 additions & 85 deletions

File tree

tests/conftest.py

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import json
2-
31
import pytest
42
import stamina
53
from loguru import logger
@@ -22,85 +20,3 @@ def caplog(caplog):
2220
)
2321
yield caplog
2422
logger.remove(handler_id)
25-
26-
27-
@pytest.fixture
28-
def sample_municipality():
29-
return {
30-
"bfs": "351",
31-
"name": "Bern",
32-
"canton": "Bern",
33-
"domain": "bern.ch",
34-
"mx": ["bern-ch.mail.protection.outlook.com"],
35-
"spf": "v=spf1 include:spf.protection.outlook.com -all",
36-
"provider": "microsoft",
37-
}
38-
39-
40-
@pytest.fixture
41-
def sovereign_municipality():
42-
return {
43-
"bfs": "6404",
44-
"name": "Boudry",
45-
"canton": "Neuchatel",
46-
"domain": "ne.ch",
47-
"mx": ["nemx9a.ne.ch", "ne2mx9a.ne.ch"],
48-
"spf": "v=spf1 include:spf1.ne.ch include:spf.protection.outlook.com ~all",
49-
"provider": "swiss-isp",
50-
"gateway": "cantonal-ne",
51-
}
52-
53-
54-
@pytest.fixture
55-
def unknown_municipality():
56-
return {
57-
"bfs": "9999",
58-
"name": "Testingen",
59-
"canton": "Testland",
60-
"domain": "",
61-
"mx": [],
62-
"spf": "",
63-
"provider": "unknown",
64-
}
65-
66-
67-
@pytest.fixture
68-
def sample_data_json(tmp_path):
69-
data = {
70-
"generated": "2025-01-01T00:00:00Z",
71-
"total": 3,
72-
"counts": {"microsoft": 1, "swiss-isp": 1, "unknown": 1},
73-
"municipalities": {
74-
"351": {
75-
"bfs": "351",
76-
"name": "Bern",
77-
"canton": "Bern",
78-
"domain": "bern.ch",
79-
"mx": ["bern-ch.mail.protection.outlook.com"],
80-
"spf": "v=spf1 include:spf.protection.outlook.com -all",
81-
"provider": "microsoft",
82-
},
83-
"6404": {
84-
"bfs": "6404",
85-
"name": "Boudry",
86-
"canton": "Neuchatel",
87-
"domain": "ne.ch",
88-
"mx": ["nemx9a.ne.ch", "ne2mx9a.ne.ch"],
89-
"spf": "v=spf1 include:spf1.ne.ch include:spf.protection.outlook.com ~all",
90-
"provider": "swiss-isp",
91-
"gateway": "cantonal-ne",
92-
},
93-
"9999": {
94-
"bfs": "9999",
95-
"name": "Testingen",
96-
"canton": "Testland",
97-
"domain": "",
98-
"mx": [],
99-
"spf": "",
100-
"provider": "unknown",
101-
},
102-
},
103-
}
104-
path = tmp_path / "data.json"
105-
path.write_text(json.dumps(data), encoding="utf-8")
106-
return path

tests/test_pipeline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ def test_minify_strips_unused_fields(self):
332332

333333
entry = mini["municipalities"]["351"]
334334
assert "bfs" not in entry
335-
assert "canton" not in entry
336335
assert "sources_detail" not in entry
337336
assert "resolve_flags" not in entry
338337

0 commit comments

Comments
 (0)