def _make_couch_pillow(couch_db): from pillowtop.feed.couch import CouchChangeFeed from pillowtop.processors import LoggingProcessor from pillowtop.checkpoints.manager import PillowCheckpoint pillow = FakeConstructedPillow( name='fake-couch-pillow', checkpoint=PillowCheckpoint('fake-feed-test-checkpoint', 'text'), change_feed=CouchChangeFeed(couch_db=couch_db), processor=LoggingProcessor(), ) pillow.process_change = MagicMock(return_value=True) return pillow
def GetDocPillow(): return FakeConstructedPillow( name='GetDocPillow', checkpoint=PillowCheckpoint('get_doc_processor', 'text'), change_feed=RandomChangeFeed(10), processor=GetDocProcessor(), )