If a BelongsTo relationship is cleared, the foreign-key atrribute is set to None, but such attributes are ignored during save(). The test_clear_belongs_to is broken because it does not call refresh, it checks only in-memory value. This testcase demonstrates the problem:
If a BelongsTo relationship is cleared, the foreign-key atrribute is set to
None
, but such attributes are ignored duringsave()
. Thetest_clear_belongs_to
is broken because it does not call refresh, it checks only in-memory value. This testcase demonstrates the problem: