#NEWLINE# def test_manyrelated_add_commit( self ) : #NEWLINE# #INDENT# 'Test for https://code.djangoproject.com/ticket/16818' #NEWLINE# a = M2mA . objects . create ( ) #NEWLINE# b = M2mB . objects . create ( fld = 10 ) #NEWLINE# a . others . add ( b ) #NEWLINE# transaction . rollback ( ) #NEWLINE# self . assertEqual ( a . others . count ( ) , 1 )