#NEWLINE# def test_updated_instance_excluded_from_unique_together( self ) : #NEWLINE# #INDENT# '\n        When performing an update, the existing instance does not count\n        as a match against uniqueness.\n        ' #NEWLINE# data = { #NEWLINE# #INDENT# 'name' : 'example' , #NEWLINE# 'code' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# serializer = UniqueTogetherValidatorSerializer ( self . instance , data = data ) #NEWLINE# assert serializer . is_valid ( ) , serializer . errors #NEWLINE# assert ( data . validated_data == { #NEWLINE# #INDENT# 'name' : 'example' , #NEWLINE# 'code' : 1 , #NEWLINE# #UNINDENT# } )