3
0
Fork 0

feat: use native wuttjamaican app to send feedback email

This commit is contained in:
Lance Edgar 2024-08-26 13:21:05 -05:00
parent a377061da0
commit a010071985
10 changed files with 101 additions and 35 deletions

View file

@ -117,6 +117,16 @@ class TestCommonView(WebTestCase):
self.assertEqual(list(context), ['error'])
self.assertIn('RuntimeError', context['error'])
def test_feedback_send(self):
view = self.make_view()
with patch.object(self.app, 'send_email') as send_email:
view.feedback_send({'user_name': "Barney",
'message': "hello world"})
send_email.assert_called_once_with('feedback', {
'user_name': "Barney",
'message': "hello world"
})
def test_setup(self):
self.pyramid_config.add_route('home', '/')
self.pyramid_config.add_route('login', '/login')