Esempio n. 1
0
    def setUp(self):
        super(AdminExceptionHandlerDispatchingTests, self).setUp()

        # Mock out all of the handling methods, we're just testing to see that the
        # dispatching from error code to handle method is correct
        self.handler = AdminExceptionHandler(self.prompt, self.config)
        self.handler._handle_authentication_failed = mock.MagicMock()
        self.handler._handle_invalid_username = mock.MagicMock()
        self.handler._handle_permission_error = mock.MagicMock()
        self.handler._handle_unknown = mock.MagicMock()
Esempio n. 2
0
    def setUp(self):
        super(AdminExceptionHandlerTests, self).setUp()

        self.handler = AdminExceptionHandler(self.prompt, self.config)