File size: 467 Bytes
0e239c6
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
"""User-authorized acceptance policy; never mutate frozen contracts."""


def endpoint_plan(contract, repository_keys):
    keys = list(repository_keys)
    if not keys or len(keys) != len(set(keys)) or any(not key for key in keys):
        raise ValueError('Repository identities must be nonempty and unique')
    return [{'world': name, 'repeat': 1, 'fixed': {key: fixed for key in keys}}
            for name, fixed in [('all_buggy', False), ('all_fixed', True)]]