def no(word): """Noify a word""" length = len(word) # Words longer than two will have: # * first letter N # * all others O return meow.capify("n" + ("o" * (length-1)), word)
def test_capify_4(self): word = "meow" reference = "BoOk" out = meow.capify(word, reference) self.assertEqual(out, "MeOw")
def test_capify_3(self): word = "meow" reference = "book" out = meow.capify(word, reference) self.assertEqual(out, "meow")
def test_capify_2(self): word = "meow" reference = "BOOK" out = meow.capify(word, reference) self.assertEqual(out, "MEOW")