Skip to content

Instantly share code, notes, and snippets.

@adililhan
Last active December 18, 2021 19:04
Show Gist options
  • Select an option

  • Save adililhan/6eaf8a67edb119b21ffb069aabd88ec3 to your computer and use it in GitHub Desktop.

Select an option

Save adililhan/6eaf8a67edb119b21ffb069aabd88ec3 to your computer and use it in GitHub Desktop.
Wrong unit test
@patch.object(
UserController, "__init__", Mock(return_value=None)
)
def test_get_first_picture(self):
user = UserController()
user.picture = MagicMock()
self.assertEqual("Test 1", user.get_first_picture())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment