
from mistraldashboard.handle_errors import handle_errors
from mistraldashboard.test import helpers as test


class ErrorHandleTests(test.TestCase):

    class CommonException(Exception):
        pass

    def test_args_request_view_error_handle(self):

        @handle_errors('Error message')
        def common_view(request):
            raise self.CommonException()

        self.assertRaises(self.CommonException, common_view, {})

    def test_kwargs_request_view_error_handle(self):

        @handle_errors('Error message')
        def common_view(slf, request, context=None):
            raise self.CommonException()

        with self.assertRaises(self.CommonException):
            common_view(slf=None, request={})


from mistraldashboard.test import helpers as test


class ErrorHandleTests(test.TestCase):

    class CommonException(Exception):
        pass

Remove the test cases for handle_errors to fix the py27 gate issue
Remove the test cases for handle_errors to fix the py27 gate issue

As we just change the exceptions handle method in horizon, now the
test cases have some issues, so disable them first to fix all py27
gate fails.

Change-Id: Ic369434a40ff209b06de9481884637d46ee588f7

  
- from mistraldashboard.handle_errors import handle_errors
  from mistraldashboard.test import helpers as test
  
  
  class ErrorHandleTests(test.TestCase):
  
      class CommonException(Exception):
          pass
  
-     def test_args_request_view_error_handle(self):
- 
-         @handle_errors('Error message')
-         def common_view(request):
-             raise self.CommonException()
- 
-         self.assertRaises(self.CommonException, common_view, {})
- 
-     def test_kwargs_request_view_error_handle(self):
- 
-         @handle_errors('Error message')
-         def common_view(slf, request, context=None):
-             raise self.CommonException()
- 
-         with self.assertRaises(self.CommonException):
-             common_view(slf=None, request={})
- 
Remove the test cases for handle_errors to fix the py27 gate issue
## Code Before:

from mistraldashboard.handle_errors import handle_errors
from mistraldashboard.test import helpers as test


class ErrorHandleTests(test.TestCase):

    class CommonException(Exception):
        pass

    def test_args_request_view_error_handle(self):

        @handle_errors('Error message')
        def common_view(request):
            raise self.CommonException()

        self.assertRaises(self.CommonException, common_view, {})

    def test_kwargs_request_view_error_handle(self):

        @handle_errors('Error message')
        def common_view(slf, request, context=None):
            raise self.CommonException()

        with self.assertRaises(self.CommonException):
            common_view(slf=None, request={})

## Instruction:
Remove the test cases for handle_errors to fix the py27 gate issue
## Code After:

from mistraldashboard.test import helpers as test


class ErrorHandleTests(test.TestCase):

    class CommonException(Exception):
        pass
