Another way SequenceReplace[{1, 0, 1} -> {1, 1, 1}] /* Flatten /@ testlist