def test_data_url():
 data = jinja.render('test3.html')
 print data
 url = QUrl(data)
 assert url.isValid()
 assert (data == 'data:text/plain;base64,Zm9v')

def test_data_url ( ) : data = jinja . render ( 'test3.html' ) print data url = QUrl ( data ) assert url . isValid ( ) assert ( data == 'data:text/plain;base64,Zm9v' )
test data_url() which can be used from templates .