Created
December 18, 2021 18:47
-
-
Save adililhan/f69ede3a08c4dee8dd6921a8bac93d02 to your computer and use it in GitHub Desktop.
Wrong unit test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @patch.object( | |
| UserController, "__init__", Mock(return_value=None) | |
| ) | |
| def test_get_second_picture(self): | |
| mock_app = MagicMock() | |
| mock_app.dbal.all.return_value = ["Test 1", "Test 2"] | |
| user = UserController() | |
| user.picture = mock_app | |
| self.assertEqual("Test 2", user.get_second_picture()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment