Example #1
0
    def get_sample_namespace(self):
        # Command expects these objects forming a non-obvious contract
        # with the runtime
        debugStream = StringIO()
        debugStream.__call__ = debugStream.write
        infoStream = StringIO()
        infoStream.__call__ = infoStream.write
        errorStream = StringIO()
        errorStream.__call__ = errorStream.write

        log = AttrDict(debug=debugStream, info=infoStream, error=errorStream)
        return Namespace(log=log, verbose=False, parser=AttrDict(prog="juju"))
Example #2
0
    def get_sample_namespace(self):
        # Command expects these objects forming a non-obvious contract
        # with the runtime
        debugStream = StringIO()
        debugStream.__call__ = debugStream.write
        infoStream = StringIO()
        infoStream.__call__ = infoStream.write
        errorStream = StringIO()
        errorStream.__call__ = errorStream.write

        log = AttrDict(debug=debugStream, info=infoStream, error=errorStream)
        return Namespace(log=log,
                         verbose=False,
                         parser=AttrDict(prog="juju"))