Use assert_true instead of assert_
assert_ is deprecated which causes annoying warnings
This commit is contained in:
parent
5b89355b1c
commit
239780be28
12 changed files with 147 additions and 144 deletions
|
|
@ -42,7 +42,7 @@ class ExtImportHookTestCase(FlaskTestCase):
|
|||
def teardown(self):
|
||||
from flask import ext
|
||||
for key in ext.__dict__:
|
||||
self.assert_('.' not in key)
|
||||
self.assert_true('.' not in key)
|
||||
|
||||
def test_flaskext_new_simple_import_normal(self):
|
||||
from flask.ext.newext_simple import ext_id
|
||||
|
|
@ -108,12 +108,12 @@ class ExtImportHookTestCase(FlaskTestCase):
|
|||
import flask.ext.broken
|
||||
except ImportError:
|
||||
exc_type, exc_value, tb = sys.exc_info()
|
||||
self.assert_(exc_type is ImportError)
|
||||
self.assert_true(exc_type is ImportError)
|
||||
self.assert_equal(str(exc_value), 'No module named missing_module')
|
||||
self.assert_(tb.tb_frame.f_globals is globals())
|
||||
self.assert_true(tb.tb_frame.f_globals is globals())
|
||||
|
||||
next = tb.tb_next
|
||||
self.assert_('flask_broken/__init__.py' in next.tb_frame.f_code.co_filename)
|
||||
self.assert_true('flask_broken/__init__.py' in next.tb_frame.f_code.co_filename)
|
||||
|
||||
|
||||
def suite():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue