def test_wrong_type(self): """ Tests for the case that the wrong type is given. """ self.assertRaises( PyFunceble.exceptions.WrongParameterType, lambda: Digit2Digits(["1"]).get_converted(), ) self.assertRaises( PyFunceble.exceptions.WrongParameterType, lambda: Digit2Digits(1).get_converted(), )
def test_more_than_two_digits(self): """ Tests of the class for the case that we already have more than 2 digits. """ expected = "211" actual = Digit2Digits("211").get_converted() self.assertEqual(expected, actual)
def test_simple_input(self): """ Tests of the class. """ expected = "01" actual = Digit2Digits("1").get_converted() self.assertEqual(expected, actual)