refactor get_options to get_config_args
| | |
| | | if self.args.verbose > 0: |
| | | print(msg) |
| | | |
| | | def get_options(self): |
| | | def get_config_args(self): |
| | | restvars = self.args.config_args |
| | | return parse_vars(restvars) |
| | | |
| | |
| | | return 2 |
| | | app_spec = self.args.config_uri |
| | | |
| | | vars = self.get_options() |
| | | vars = self.get_config_args() |
| | | app_name = self.args.app_name |
| | | |
| | | base = os.getcwd() |
| | |
| | | self.assertEqual(result, 2) |
| | | self.assertEqual(self.out_.getvalue(), 'You must give a config file') |
| | | |
| | | def test_get_options_no_command(self): |
| | | def test_config_args_no_command(self): |
| | | inst = self._makeOne() |
| | | inst.args = ['foo', 'a=1', 'b=2'] |
| | | result = inst.get_options() |
| | | result = inst.get_config_args() |
| | | self.assertEqual(result, {'a': '1', 'b': '2'}) |
| | | |
| | | def test_parse_vars_good(self): |