Ejemplo n.º 1
0
 def it_can_dispatch_an_extract_command_to_the_app(self, args_,
                                                   app_controller_):
     # fixture ----------------------
     extract_command = ExtractCommand(None)
     # exercise ---------------------
     extract_command.execute(args_, app_controller_)
     # verify -----------------------
     app_controller_.extract_package.assert_called_once_with(
         args_.pkg_path, args_.dirpath)
Ejemplo n.º 2
0
 def it_should_trigger_parser_error_if_pkg_path_does_not_exist(
         self, args_, parser_):
     # fixture ----------------------
     args_.pkg_path = 'foobar'
     extract_command = ExtractCommand(parser_)
     # exercise ---------------------
     extract_command.validate(args_)
     # verify -----------------------
     parser_.error.assert_called_once_with(ANY)
     assert 'PKG_PATH' in parser_.error.call_args[0][0]