def METHOD_NAME(self, post):
    login_result = Mock()
    login_result.text = '...<a href="https://tr.anidub.com/index.php?action=logout">...'
    post.return_value = login_result
    with self.assertRaises(AnidubLoginFailedException) as e:
        self.tracker.login(helper.fake_login, helper.fake_password)
    self.assertEqual(e.exception.code, 2)
    self.assertEqual(e.exception.message, 'Failed to retrieve cookies')