Skip to content
Myr

Update testing.rst (#1987)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Python 3.4.2 TypeError: Type str doesn't support the buffer API

authored by teichopsia- · committed by David Lord · parent 0f1cf50 · Browse files · 1 file+7 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−7 removed

  • other:+7 added−7 removed

1 file+7 added−7 removed

modified:docs/testing.rst+7 added-7 removed
150 unmodified lines
151invalid credentials. Add this new test to the class::152153 def test_login_logout(self):154 rv = self.login('admin', 'default')155 assert 'You were logged in' in rv.data155 assert b'You were logged in' in rv.data156 rv = self.logout()157 assert 'You were logged out' in rv.data157 assert b'You were logged out' in rv.data158 rv = self.login('adminx', 'default')159 assert 'Invalid username' in rv.data159 assert b'Invalid username' in rv.data160 rv = self.login('admin', 'defaultx')161 assert 'Invalid password' in rv.data161 assert b'Invalid password' in rv.data162163Test Adding Messages164--------------------165
5 unmodified lines
171 rv = self.app.post('/add', data=dict(172 title='<Hello>',173 text='<strong>HTML</strong> allowed here'174 ), follow_redirects=True)175 assert 'No entries here so far' not in rv.data176 assert '&lt;Hello&gt;' in rv.data177 assert '<strong>HTML</strong> allowed here' in rv.data175 assert b'No entries here so far' not in rv.data176 assert b'&lt;Hello&gt;' in rv.data177 assert b'<strong>HTML</strong> allowed here' in rv.data178179Here we check that HTML is allowed in the text but not in the title,180which is the intended behavior.181
174 unmodified lines