@@ -1958,7 +1958,7 @@ def test_bulk_add_remove(self):
19581958 self .assertEqual (prev_record .places .all ().count (), 0 )
19591959
19601960 # Remove all places but the first
1961- self .poll .places .remove (* Place .objects .filter ( id__gt = 1 ))
1961+ self .poll .places .remove (* Place .objects .exclude ( pk = self . place . pk ))
19621962
19631963 self .assertEqual (self .poll .history .all ().count (), 3 )
19641964
@@ -2010,7 +2010,7 @@ def test_diff_against(self):
20102010
20112011 delta = add_record .diff_against (create_record )
20122012 expected_change = ModelChange (
2013- "places" , [], [{"pollwithmanytomany" : 1 , "place" : 1 }]
2013+ "places" , [], [{"pollwithmanytomany" : self . poll . pk , "place" : self . place . pk }]
20142014 )
20152015 self .assertEqual (delta .changed_fields , ["places" ])
20162016 self .assertEqual (delta .old_record , create_record )
@@ -2030,7 +2030,7 @@ def test_diff_against(self):
20302030 # Second and third should have the same diffs as first and second, but with
20312031 # old and new reversed
20322032 expected_change = ModelChange (
2033- "places" , [{"place" : 1 , "pollwithmanytomany" : 1 }], []
2033+ "places" , [{"place" : self . place . pk , "pollwithmanytomany" : self . poll . pk }], []
20342034 )
20352035 delta = del_record .diff_against (add_record )
20362036 self .assertEqual (delta .changed_fields , ["places" ])
0 commit comments