cement/tests/core/test_controller.py

26 lines
673 B
Python
Raw Permalink Normal View History

2011-10-20 06:23:14 +00:00
from cement.core.controller import ControllerInterface, ControllerHandler
2018-03-02 03:23:38 +00:00
# module tests
2011-10-20 06:23:14 +00:00
class TestControllerInterface(object):
def test_interface(self):
assert ControllerInterface.Meta.interface == 'controller'
class TestControllerHandler(object):
def test_subclassing(self):
class MyControllerHandler(ControllerHandler):
class Meta:
label = 'my_controller_handler'
def _dispatch(self, *args, **kw):
pass
h = MyControllerHandler()
assert h._meta.interface == 'controller'
assert h._meta.label == 'my_controller_handler'
2018-03-02 03:23:38 +00:00
# app functionality and coverage tests