generated from kgod/ai-review-template
feat: initialize resume agent with OfferPai sync
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Characterization tests for optimization context anchoring."""
|
||||
|
||||
from app.optimization_flow import OptimizationFlowMixin
|
||||
|
||||
|
||||
def test_context_carries_target_position_and_major():
|
||||
session = {
|
||||
"profile": {
|
||||
"job_type": "校招",
|
||||
"target_position": "数据分析师",
|
||||
"anchor": {"major": "统计学"},
|
||||
}
|
||||
}
|
||||
section = {"kind": "internship_experience"}
|
||||
|
||||
context = OptimizationFlowMixin._context(session, section, None)
|
||||
|
||||
assert context["target_position"] == "数据分析师"
|
||||
assert context["major"] == "统计学"
|
||||
assert context["entry_type"] == "internship_experience"
|
||||
|
||||
|
||||
def test_context_tolerates_missing_target_position():
|
||||
session = {"profile": {"job_type": "社招", "anchor": {}}}
|
||||
section = {"kind": "work_experience"}
|
||||
|
||||
context = OptimizationFlowMixin._context(session, section, None)
|
||||
|
||||
assert context["target_position"] is None
|
||||
Reference in New Issue
Block a user