@@ -112,9 +112,10 @@ class test_TasKPool(Case):
class test_Timer(Case):
def test_timer(self):
- x = Timer()
- x.ensure_started()
- x.schedule = Mock()
- x.start()
- x.stop()
- x.schedule.clear.assert_called_with()
+ with mock_module(*gevent_modules):
+ x = Timer()
+ x.ensure_started()
+ x.schedule = Mock()
+ x.start()
+ x.stop()
+ x.schedule.clear.assert_called_with()
@@ -634,6 +634,9 @@ class test_Consumer(Case):
def channel(self):
return Mock()
+ def as_uri(self):
+ return 'dummy://'
+
def drain_events(self, **kwargs):
if not self.calls:
self.calls += 1