~tycho-s/simplestreams/fix-1237990

« back to all changes in this revision

Viewing changes to tests/testutil.py

  • Committer: Scott Moser
  • Date: 2013-09-06 14:04:38 UTC
  • Revision ID: smoser@ubuntu.com-20130906140438-burkz17kkinylto1
MirrorReaderi add 'path' to the arguments passed to policy.

This just adds 'path' to the data passed to policy.  It isn't used
anywhere now, but it seems reasonable to add more information to the
call now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
    src_d = os.path.join(EXAMPLES_DIR, name)
15
15
    sstore = objectstores.FileStore(src_d)
16
 
    kwargs = {} if signed else {"policy": lambda c: c}
 
16
 
 
17
    def policy(content, path):  # pylint: disable=W0613
 
18
        return content
 
19
 
 
20
    kwargs = {} if signed else {"policy": policy}
17
21
    return mirrors.ObjectStoreMirrorReader(sstore, **kwargs)
18
22
 
19
23
# vi: ts=4 expandtab syntax=python