Skip to content

Commit

Permalink
[IMP] Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edescalona committed Dec 3, 2024
1 parent 7039b85 commit f3966e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website_recaptcha_v2_login/tests/test_recaptcha.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from odoo.tests import common
from unittest import mock

from odoo.tests import common

imp_requests = "odoo.addons.website_recaptcha_v2.models.website.requests"


Expand All @@ -20,8 +21,7 @@ def setUpClass(cls):
@mock.patch(imp_requests)
def test_captcha_valid(self, requests_mock):
requests_mock.post().json.return_value = {"success": True}
result, error_msg = self.website.is_recaptcha_v2_valid(
result = self.website.valid_recaptcha(
{"g-recaptcha-response": "dummy_response"}
)
self.assertTrue(result)
self.assertEqual(error_msg, "")

0 comments on commit f3966e6

Please sign in to comment.