

def test_continuous_replicator(self):
    replicator = ContinuousReplicator(self.migration.source_db, self.migration.target_db, self.migration.doc_types)
    for (i, doc) in enumerate(self.docs):
        change = CouchChange(seq=i, id=doc['_id'], rev=doc['_rev'], deleted=False)
        replicator.replicate_change(change)
    replicator.commit()
    self.assert_in_sync()
    for (i, doc) in enumerate(self.docs):
        change = CouchChange(seq=i, id=doc['_id'], rev='go fuck yourself', deleted=True)
        replicator.replicate_change(change)
    replicator.commit()
    self.assert_no_docs_in_target_db()

dataset/ETHPy150Open dimagi/commcare-hq/corehq/doctypemigrations/tests.py TestDocTypeMigrations.test_continuous_replicator/original