def test_string(self): """Tests that if a string is passed in, it will called the function.""" result = maybe_coerce_with(dummy_function, "2") # Dummy function will be 2 + 2 therefore 4. self.assertEqual(result, 4)
def test_none_string(self): """Tests that if a none string is passed in, it will return it.""" result = maybe_coerce_with(dummy_function, 2) expected = 2 self.assertEqual(result, expected)