#NEWLINE# def test_invalid_update_to_existing( self ) : #NEWLINE# #INDENT# rec1 = AddressRecord ( label = 'bar' , domain = self . z_o_e , ip_str = '128.193.40.1' , ip_type = '4' ) #NEWLINE# rec2 = AddressRecord ( label = 'bar' , domain = self . z_o_e , ip_str = '128.193.40.2' , ip_type = '4' ) #NEWLINE# rec3 = AddressRecord ( label = 'foo' , domain = self . z_o_e , ip_str = '128.193.40.1' , ip_type = '4' ) #NEWLINE# rec3 . save ( ) #NEWLINE# rec2 . save ( ) #NEWLINE# rec1 . save ( ) #NEWLINE# rec1 . label = 'foo' #NEWLINE# self . assertRaises ( ValidationError , rec1 . save ) #NEWLINE# rec3 . label = 'bar' #NEWLINE# self . assertRaises ( ValidationError , rec3 . save ) #NEWLINE# osu_block = '633:105:F000:' #NEWLINE# rec1 = AddressRecord ( label = 'bar' , domain = self . z_o_e , ip_str = ( osu_block + ':1' ) , ip_type = '6' ) #NEWLINE# rec2 = AddressRecord ( label = 'bar' , domain = self . z_o_e , ip_str = ( osu_block + ':2' ) , ip_type = '6' ) #NEWLINE# rec3 = AddressRecord ( label = 'foo' , domain = self . z_o_e , ip_str = ( osu_block + ':1' ) , ip_type = '6' ) #NEWLINE# rec1 . save ( ) #NEWLINE# rec2 . save ( ) #NEWLINE# rec3 . save ( ) #NEWLINE# rec2 . ip_str = ( osu_block + ':1' ) #NEWLINE# self . assertRaises ( ValidationError , rec2 . save ) #NEWLINE# rec3 . label = 'bar' #NEWLINE# self . assertRaises ( ValidationError , osu_block . save )