mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 15:26:47 +00:00
26 lines
673 B
Python
26 lines
673 B
Python
|
|
from cement.core.controller import ControllerInterface, ControllerHandler
|
|
|
|
|
|
# module tests
|
|
|
|
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'
|
|
|
|
# app functionality and coverage tests
|