django/django — pull request #3618 by adamalton (2014-11-25 11:26:01+00:00)
Title: Fix object references in OneToOneTests.test_foreign_key

It seems that as the result of a copy-paste-o, there were several incorrect references being made in the assertions in this test. The test just passed by fluke because the IDs happened to be the same.

Some of the assertions which used to exist had also been been removed, seemingly because they failed when Django's query behaviour changed to introduce checking of object types as well as PK values, but no one realised that the assertions were referencing the wrong objects! So now that the references have been fixed, I've restored those assertions as well.

All tests pass.