#NEWLINE# def test13_attr_value( self ) : #NEWLINE# #INDENT# 'Testing the attr_value() method.' #NEWLINE# s1 = SpatialReference ( 'WGS84' ) #NEWLINE# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# s1 . __getitem__ ( 0 ) #NEWLINE# #UNINDENT# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# s1 . __getitem__ ( ( 'GEOGCS' , 'foo' ) ) #NEWLINE# #UNINDENT# self . assertEqual ( 'WGS 84' , s1 [ 'GEOGCS' ] ) #NEWLINE# self . assertEqual ( 'WGS_1984' , s1 [ 'DATUM' ] ) #NEWLINE# self . assertEqual ( 'EPSG' , s1 [ 'AUTHORITY' ] ) #NEWLINE# self . assertEqual ( 4326 , int ( self [ ( 'AUTHORITY' , 1 ) ] ) ) #NEWLINE# self . assertIsNone ( s1 [ 'FOOBAR' ] )