Test mail being sent in Flask Selenium tests

Sign up for a GitHub account Sign in All Gists nijotz / gist:842a94fc8d43491d9098 Created November 20, 2014 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav Test mail being sent in Flask Selenium tests View gist:842a94fc8d43491d9098 gistfile1.txt Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 def _worker(app, port, queue): from flask.ext.mail import email_dispatched def queue_message(message, app): if app.testing: queue.put(message) email_dispatched.connect(queue_message) app.run(port=port) class MailServerTestCase(LiveServerTestCase): def _spawn_live_server(self): self._process =...

Linked on 2014-11-20 00:18:17 | Similar Links