mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-17 03:25:19 +00:00
Updates test mock
This commit is contained in:
parent
40ead41176
commit
881d5682e3
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ from bookwyrm.tests.validate_html import validate_html
|
||||||
class RegisterViews(TestCase):
|
class RegisterViews(TestCase):
|
||||||
"""login and password management"""
|
"""login and password management"""
|
||||||
|
|
||||||
|
# pylint: disable=invalid-name
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
"""we need basic test data and mocks"""
|
"""we need basic test data and mocks"""
|
||||||
self.factory = RequestFactory()
|
self.factory = RequestFactory()
|
||||||
|
@ -382,6 +383,6 @@ class RegisterViews(TestCase):
|
||||||
"""try again"""
|
"""try again"""
|
||||||
request = self.factory.post("", {"email": "mouse@mouse.com"})
|
request = self.factory.post("", {"email": "mouse@mouse.com"})
|
||||||
request.user = self.anonymous_user
|
request.user = self.anonymous_user
|
||||||
with patch("bookwyrm.emailing.send_email.delay") as mock:
|
with patch("bookwyrm.emailing.send_email") as mock:
|
||||||
views.ResendConfirmEmail.as_view()(request)
|
views.ResendConfirmEmail.as_view()(request)
|
||||||
self.assertEqual(mock.call_count, 1)
|
self.assertEqual(mock.call_count, 1)
|
||||||
|
|
Loading…
Reference in a new issue