예제 #1
0
파일: base.py 프로젝트: ProzorroUKR/reports
 def get_args(self, kind=None):
     mock_parse = get_mock_parser()
     if kind is not None:
         type(mock_parse.return_value).kind = mock.PropertyMock(
             return_value=kind)
     with mock.patch('argparse.ArgumentParser.parse_args', mock_parse):
         return get_arguments_parser().parse_args()
예제 #2
0
 def setUp(self):
     super(BaseInvoicesUtilityTest, self).setUp()
     mock_parse = get_mock_parser()
     with mock.patch('argparse.ArgumentParser.parse_args', mock_parse):
         args = get_arguments_parser().parse_args()
         config = read_config(args.config)
         self.utility = invoices.InvoicesUtility(args.broker, args.period, config)
예제 #3
0
def run():
    parser = get_arguments_parser()
    args = parser.parse_args()
    config = read_config(args.config)
    dictConfig(config)
    utility = BidsUtility(args.broker, args.period,
                          config, timezone=args.timezone)
    utility.run()
예제 #4
0
def run():
    parser = get_arguments_parser()
    args = parser.parse_args()
    config = read_config(args.config)
    dictConfig(config)
    utility = InvoicesUtility(
        args.broker, args.period,
        config, timezone=args.timezone)
    utility.run()
예제 #5
0
 def setUp(self):
     super(BaseRefundsUtilityTest, self).setUp()
     mock_parse = get_mock_parser()
     type(mock_parse.return_value).kind = mock.PropertyMock(
         return_value=['general'])
     with mock.patch('argparse.ArgumentParser.parse_args', mock_parse):
         args = get_arguments_parser().parse_args()
         config = read_config(args.config)
         self.utility = refunds.RefundsUtility(args.broker, args.period, config, kind=args.kind)
def run():
    parser = get_arguments_parser()

    args = parser.parse_args()
    config = read_config(args.config)
    dictConfig(config)
    utility = TendersProzorroMarketUtility(args.broker,
                                           args.period,
                                           config,
                                           timezone=args.timezone,
                                           mode=args.mode)
    utility.run()
예제 #7
0
def run():
    parser = get_arguments_parser()
    parser.add_argument('--kind',
                        metavar='Kind',
                        action=Kind,
                        help='Kind filtering functionality. '
                        'Usage: --kind <include, exclude, one>=<kinds>')

    args = parser.parse_args()
    config = read_config(args.config)
    dictConfig(config)
    utility = RefundsUtility(args.broker,
                             args.period,
                             config,
                             timezone=args.timezone)
    utility.run()
예제 #8
0
def run():
    parser = get_arguments_parser()
    parser.add_argument(
             '--kind',
             metavar='Kind',
             action=Kind,
             help='Kind filtering functionality. '
             'Usage: --kind <include, exclude, one>=<kinds>'
             )

    args = parser.parse_args()
    config = read_config(args.config) 
    dictConfig(config)
    utility = TendersUtility(
        args.broker, args.period,
        config, timezone=args.timezone)
    utility.kinds = args.kind
    utility.run()