#NEWLINE# def test_vrf1( self ) : #NEWLINE# #INDENT# ' Test VRF RT input values\n        ' #NEWLINE# v = VRF ( ) #NEWLINE# v . name = 'test-vrf' #NEWLINE# broken_values = [ 'foo' , '123:foo' , 'foo:123' , '123.456.789.123:123' , '123.123.200. 1:123' , ' 123.456.789.123:123' ] #NEWLINE# for bv in broken_values : #NEWLINE# #INDENT# with self . assertRaisesRegexp ( pynipap . NipapValueError , 'Invalid input for column rt' ) : #NEWLINE# #INDENT# v . rt = bv #NEWLINE# v . save ( ) #NEWLINE# #UNINDENT# #UNINDENT# v . rt = '123:456' #NEWLINE# v . save ( ) #NEWLINE# self . assertEqual ( '123:456' , VRF . list ( { #NEWLINE# #INDENT# 'name' : 'test-vrf' , #NEWLINE# #UNINDENT# } ) [ 0 ] . rt ) #NEWLINE# v . rt = ' 123:456' #NEWLINE# v . save ( ) #NEWLINE# self . assertEqual ( '123:456' , VRF . list ( { #NEWLINE# #INDENT# 'name' : 'test-vrf' , #NEWLINE# #UNINDENT# } ) [ 0 ] . rt ) #NEWLINE# v . rt = '123.123.123.123:456' #NEWLINE# v . save ( ) #NEWLINE# self . assertEqual ( '123.123.123.123:456' , VRF . list ( { #NEWLINE# #INDENT# 'name' : 'test-vrf' , #NEWLINE# #UNINDENT# } ) [ 0 ] . rt )