Merge pull request #1818 from ilvalle/py3.6dev

fix include_meta for py35, added tests
This commit is contained in:
mdipierro
2017-12-02 13:01:12 -06:00
committed by GitHub
3 changed files with 16 additions and 1 deletions
+11
View File
@@ -230,3 +230,14 @@ class testResponse(unittest.TestCase):
current.session._fixup_before_save()
cookie = str(current.response.cookies)
self.assertTrue('httponly' not in cookie.lower())
def test_include_meta(self):
response = Response()
response.meta[u'web2py'] = 'web2py'
response.include_meta()
self.assertEqual(response.body.getvalue(), '\n<meta name="web2py" content="web2py" />\n')
response = Response()
response.meta[u'meta_dict'] = {u'tag_name':'tag_value'}
response.include_meta()
self.assertEqual(response.body.getvalue(), '\n<meta tag_name="tag_value" />\n')