#NEWLINE# def test_automatic_creator( self ) : #NEWLINE# #INDENT# del self . data [ 'creator' ] #NEWLINE# serializer = api . PushNotificationRegistrationSerializer ( context = self . context , data = self . data ) #NEWLINE# ok_ ( serializer . is_valid ( ) ) #NEWLINE# eq_ ( serializer . errors , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# obj = serializer . save ( ) #NEWLINE# eq_ ( obj . creator , self . user )