예제 #1
0
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
예제 #2
0
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
예제 #3
0
def GetDocPillow():
    return FakeConstructedPillow(
        name='GetDocPillow',
        checkpoint=PillowCheckpoint('get_doc_processor', 'text'),
        change_feed=RandomChangeFeed(10),
        processor=GetDocProcessor(),
    )