Re: Unit testing - self.assertEqual("Break it!", resp.content)

2014-07-06 Thread Pepsodent Cola
Hi, I have been using assertEqual lately in my unit testing to deliberately make coverage break. By comparing *Something False* with the complete HTML returned (*resp.content*). self.assertEqual("Something False", *resp.content*) In order to reveal and debug these 3 links. self.assert

Re: Unit testing - self.assertEqual("Break it!", resp.content)

2014-07-06 Thread Mitesh Patel
Hi, You are trying to compare break it! with the complete HTML returned. Instead of assertEqual, use assertIn. self.assertIn("Break it!", resp.content) Regards, Mitesh On 7 Jul 2014 01:44, "Pepsodent Cola" wrote: > When I run this unit test to make it break so it can output a bunch of > html

Unit testing - self.assertEqual("Break it!", resp.content)

2014-07-06 Thread Pepsodent Cola
When I run this unit test to make it break so it can output a bunch of html data. self.assertEqual("Break it!", *resp.content*) test.py # Reset password no login def test_Reset_no_login(self): self.assertTrue(isinstance(self.user, User)) login = self.client.login(username='captain'