Example #1
0
 def test_right_value(self):
     for key, value in MAPPING.items():
         self.assertEqual(digit2word(key), value)
         self.assertEqual(digit2word_2nd(key), value)
         self.assertEqual(digit2word_3rd(key), value)
Example #2
0
 def test_wrong_value(self):
     """Return 'unknown' in case of wrong value"""
     self.assertEqual(digit2word('pippo'), 'unknown')
     self.assertEqual(digit2word_2nd(5), 'unknown')
     self.assertEqual(digit2word_3rd(5), 'unknown')