#NEWLINE# def test_is_unique_together( self ) : #NEWLINE# #INDENT# '\n        In a unique together validation, one field may be non-unique\n        so long as the set as a whole is unique.\n        ' #NEWLINE# data = { #NEWLINE# #INDENT# 'name' : 'other' , #NEWLINE# 'code' : 2 , #NEWLINE# #UNINDENT# } #NEWLINE# serializer = UniqueTogetherValidatorSerializer ( data = data ) #NEWLINE# assert serializer . is_valid ( ) , serializer . errors #NEWLINE# assert ( serializer . validated_data == { #NEWLINE# #INDENT# 'name' : 'other' , #NEWLINE# 'code' : 2 , #NEWLINE# #UNINDENT# } )