def test_defaults_to_base64_if_unkonwn_profile(self):
     self.parsed_args.cli_binary_format = None
     exception = ProfileNotFound(profile='notaprofile')
     self.mock_session.get_config_variable.side_effect = exception
     add_binary_formatter(self.mock_session, self.parsed_args)
     self._assert_base64_handlers_added()
 def test_base64_handlers_added(self):
     self.parsed_args.cli_binary_format = 'base64'
     add_binary_formatter(self.mock_session, self.parsed_args)
     self._assert_base64_handlers_added()
 def test_base64_handlers_added_via_profile(self):
     self.parsed_args.cli_binary_format = None
     self.mock_session.get_config_variable.return_value = 'base64'
     add_binary_formatter(self.mock_session, self.parsed_args)
     self._assert_base64_handlers_added()
 def test_legacy_handlers_added(self):
     self.parsed_args.cli_binary_format = 'raw-in-base64-out'
     add_binary_formatter(self.mock_session, self.parsed_args)
     self._assert_legacy_handlers_added()