Replaced patch with inreplace. Updated test to run locally without network.