Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
added a test for ListenerBase
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Oct 23, 2015
1 parent b880656 commit ade8075
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cliquet/listeners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def __init__(self, *args, **kwargs):
pass

def __call__(self, event):
pass
raise NotImplementedError()
9 changes: 9 additions & 0 deletions cliquet/tests/test_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from cliquet import initialization
from cliquet.events import ResourceChanged, ACTIONS
from cliquet.listeners import ListenerBase
from .support import unittest


Expand Down Expand Up @@ -129,3 +130,11 @@ def test_redis_is_broken(self):
self.config.registry.notify(event)

self.assertFalse(self.has_redis_changed())


class ListenerBaseTest(unittest.TestCase):

def test_not_implemented(self):
# make sure we can't use the base listener
listener = ListenerBase()
self.assertRaises(NotImplementedError, listener, object())

0 comments on commit ade8075

Please sign in to comment.