def test_middle(self): self.text = Long_text.check_long_text( 'I liked the look of the KDE office suite Calligra, so I "modelled" that for desktop PC\'s. mobiles' ) correct_text = ( "I liked the look of the KDE office suite Calligra, so I 'modelled' that for desktop PC's. Mobiles. " ) self.assertEqual(correct_text, self.text)
def test_none(self): self.text = Long_text.check_long_text("") correct_text = "" self.assertEqual(correct_text, self.text)
def test_good(self): self.text = Long_text.check_long_text("A lot of documentation should exist to attract developers,") correct_text = "A lot of documentation should exist to attract developers. " self.assertEqual(correct_text, self.text)
def test_bad(self): self.text = Long_text.check_long_text("; SELECT * FRom users where name LIKE '%admin%';") correct_text = "Select users admin. " self.assertEqual(correct_text, self.text)
def test_vbad(self): self.text = Long_text.check_long_text("^%gjsifepyn geyjekfslgfe7uuhoi768qsxbecbovbjh") correct_text = "" self.assertEqual(correct_text, self.text)
def setUp(self): self.text = Long_text.check_long_text("")