Beispiel #1
0
def main():
    parser = parser_with_standard_args('generate', __doc__)
    parser.add_argument('--cache',
                        help='directory in which to cache metadata downloads',
                        type=expanduser)
    args, session = script_setup(parser)
    path = prepare_target(session)
    generate(session, args.cache, path)
Beispiel #2
0
def main():
    parser = parser_with_standard_args('generate', __doc__)
    parser.add_argument('--cache',
                        help='directory in which to cache metadata downloads',
                        type=expanduser)
    args, session = script_setup(parser)
    path = prepare_target(session)
    generate(session, args.cache, path)
Beispiel #3
0
 def run_it(self, args):
     parser = parser_with_standard_args('test', 'test it')
     parser.add_argument('--test', action='store_true')
     self.logging_config = Mock()
     self.output = OutputCapture()
     with Replacer() as r:
         r.replace('logging.basicConfig', self.logging_config)
         r.replace('sys.argv', ('x '+args).split())
         with self.output:
             self.args, self.session = script_setup(parser)
Beispiel #4
0
def main():
    parser = parser_with_standard_args('get_api_key', __doc__)
    args, session = script_setup(parser)
    get_api_key(session)