I have a form with name and email, want to test it. I am trying to test the HTML content after the post, some thing as below.
I simulated the post data as follows.
response = self.c.post('/app/url/', {'name': 'xxx', 'email': '[email protected]')
After the user post the data, I want to verify the name and email from the HTML content as follows.
with self.assertHTML(response, 'input[name="xxx"]') as (elem,):
self.assertEqual(elem.value, 'xxx')
While run the tests I am getting the error:
object has no attribute 'assertHTML'
Can any one provide suggestions how to resolve this error, if any package needs to be installed please suggest what to install and how to install.