test_policy: Properly add the fake source package to the Suite.sources field

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 206d5ac5df
commit b0f0dde8f5

@ -55,6 +55,9 @@ def create_policy_objects(source_name, target_version, source_version):
def apply_policy(policy, expected_verdict, src_name, *, suite='unstable', source_version='1.0', target_version='2.0'):
src_t, src_u, excuse, policy_info = create_policy_objects(src_name, source_version, target_version)
suite_info = policy.suite_info
suite_info.target_suite.sources[src_name] = src_t
suite_info[suite].sources[src_name] = src_u
verdict = policy.apply_policy(policy_info, suite, src_name, src_t, src_u, excuse)
pinfo = policy_info[policy.policy_id]
assert verdict == expected_verdict

Loading…
Cancel
Save