# Path: habitat/utils/immortal_changes.py
# class Consumer(couchdbkit.Consumer):
#     def wait(self, callback, **kwargs):
#         def wrapped_callback(changes):


import mox
import couchdbkit
import time
from nose.tools import assert_raises
from ...utils import immortal_changes
Tests for habitat.utils.immortal_changes
"""





class DummyConsumer(object):
    # couchdbkit.Consumer, which Consumer is a subclass of, proxies
    # all methods to a backend object (e.g., "sync"). This is the
    # easiest way to get hold of those calls in order to test them,
    # but it's a bit dependent on couchdbkit's internals, which sucks.
 
    def __init__(self, *args, **kwargs):
        pass

    def wait(func, **kwargs):
        raise NotImplementedError

class DummyTimeModule(object):
    # replacing the 'time' item in immortal_changes' namespace is probably
    # nicer than modifying the real time module.

    def sleep(self, length):
        raise NotImplementedError

class TestParser(object):
    def setup(self):
        self.m = mox.Mox()


# Path: habitat/utils/immortal_changes.py
# class Consumer(couchdbkit.Consumer):
#     def wait(self, callback, **kwargs):
#         def wrapped_callback(changes):


# Path: habitat/tests/test_utils/test_immortal_changes.py
import mox
import couchdbkit
import time
from nose.tools import assert_raises
from ...utils import immortal_changes

Tests for habitat.utils.immortal_changes
"""





class DummyConsumer(object):
    # couchdbkit.Consumer, which Consumer is a subclass of, proxies
    # all methods to a backend object (e.g., "sync"). This is the
    # easiest way to get hold of those calls in order to test them,
    # but it's a bit dependent on couchdbkit's internals, which sucks.
 
    def __init__(self, *args, **kwargs):
        pass

    def wait(func, **kwargs):
        raise NotImplementedError

class DummyTimeModule(object):
    # replacing the 'time' item in immortal_changes' namespace is probably
    # nicer than modifying the real time module.

    def sleep(self, length):
        raise NotImplementedError

class TestParser(object):
    def setup(self):
        self.m = mox.Mox()


        self.consumer = immortal_changes.Consumer(None,