Closed jcass77 closed 7 years ago
I've pushed https://github.com/jarus/flask-testing/pull/96/commits/7ced97e787cdc844abe73bfb422cb3ac8f0642e6 which also fixes a TypeError
in the assertTemplateUsed
assertion's error message.
Any chance of getting this merged? Please let me know if there are any queries.
Sorry, I've been a bit busy with other things. This looks good, thank you @jcass77! The library was initially developed a few years ago and some of the tools used for unit testing are a bit crude - I'm not surprised this slipped through the cracks. I'm going to make a note of improving the test situation going forward
Fixes broken test cases for assertMessageFlashed - now checks for exceptions using
assertRaises
instead ofassert False
, which would always silently fail in theexcept
block.Handles case where no messages have been flashed yet by the time that
assertMessageFlashed
is called.Fixes #95.