Esempio n. 1
0
 def test_converter(self):
     try:
         my_exceptions.check_preconditions(True)
     except my_exceptions.application_error, err:
         app_name = my_exceptions.get_application_name(err)
         self.failUnless("my_exceptions module" == app_name)
Esempio n. 2
0
 def test_base_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(str(err) == "xyz")
Esempio n. 3
0
 def test_redirection(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(err.application_name() == "my_exceptions module")
Esempio n. 4
0
 def test_function_call(self):
     my_exceptions.check_preconditions(False)
Esempio n. 5
0
 def test_concrete_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except my_exceptions.application_error, err:
         self.failUnless(str(err) == "xyz")
Esempio n. 6
0
 def test_converter( self ):
     try:
         my_exceptions.check_preconditions( True )
     except my_exceptions.application_error, err:
         app_name = my_exceptions.get_application_name( err )
         self.failUnless( "my_exceptions module" == app_name )
Esempio n. 7
0
 def test_redirection( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( err.application_name() == "my_exceptions module" )
Esempio n. 8
0
 def test_base_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( str( err ) == "xyz" )
Esempio n. 9
0
 def test_concrete_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except my_exceptions.application_error, err:
         self.failUnless( str( err ) == "xyz" )
Esempio n. 10
0
 def test_function_call( self ):
     my_exceptions.check_preconditions( False )