def f_replace_secret_with_hashes(self, msg): replaced = msg.replace("secret", "######") if msg != replaced: return state.replace(replaced) return state.next(msg)
def test_not_next(self): self.assertFalse(state.is_next(state.done(None))) self.assertFalse(state.is_next(state.replace(None)))
def test_replace(self): self.assertTrue(state.is_replace(state.replace(None)))
def h_replace(self, t): return state.replace("pokusny")