返回 last30days-skill
test_hiring_signals_normalize.py
根目录 / tests / test_hiring_signals_normalize.py
1 import unittest
2
3 from lib import normalize
4
5
6 class HiringSignalsNormalizeTests(unittest.TestCase):
7 def test_normalize_jobs_source_item(self):
8 items = normalize.normalize_source_items(
9 "jobs",
10 [
11 {
12 "id": "J1",
13 "title": "Enterprise Security Engineer",
14 "description": "Build SSO and SOC 2 controls.",
15 "url": "https://example.com/jobs/1",
16 "department": "Engineering",
17 "location": "Remote",
18 "date": "2026-06-01",
19 "provider": "greenhouse",
20 }
21 ],
22 "2026-05-16",
23 "2026-06-16",
24 )
25 self.assertEqual(1, len(items))
26 item = items[0]
27 self.assertEqual("jobs", item.source)
28 self.assertEqual("Enterprise Security Engineer", item.title)
29 self.assertEqual("Engineering", item.container)
30 self.assertEqual("greenhouse", item.author)
31 self.assertEqual("Remote", item.metadata["location"])
32
33
34 if __name__ == "__main__":
35 unittest.main()
36
36 lines PYTHON