Exemple #1
0
 def test_textBlocker_upperCaseCheck_negative(self):
     self.assertRaises(ValueError, TextBlock.text_blocker(['AaZ']))
     self.assertRaises(ValueError, TextBlock.text_blocker(['a']))
     self.assertRaises(ValueError, TextBlock.text_blocker(['AAAAAAAAaAAAA']))
     self.assertRaises(ValueError, TextBlock.text_blocker(['ABC', 'BCD', 'CaB']))
Exemple #2
0
 def test_textBlocker_listCountCheck_positive(self):
     self.assertEquals(TextBlock.text_blocker(['A']*50), ['A'*50])
Exemple #3
0
 def test_textBlocker_listCountCheck_negative(self):
     self.assertRaises(ValueError, TextBlock.text_blocker([]))
     self.assertRaises(ValueError, TextBlock.text_blocker(['A']*51))
Exemple #4
0
 def test_textBlocker_characterLimitCheck_positive(self):
     self.assertEquals(TextBlock.text_blocker(['A'*50]), ['A']*50)
Exemple #5
0
 def test_textBlocker_characterLimitCheck_negative(self):
     self.assertRaises(ValueError, TextBlock.text_blocker(['A'*51]))
     self.assertRaises(ValueError, TextBlock.text_blocker(['ABC', '', 'DEF']))
     self.assertRaises(ValueError, TextBlock.text_blocker(['ABC', ['A'*51]]))
Exemple #6
0
 def test_textBlocker_upperCaseCheck_positive(self):
     self.assertEquals(TextBlock.text_blocker(['ABC', 'XYZ']), ['AX', 'BY', 'CZ'])