Add generic handler base class, tests, docs
This commit is contained in:
parent
27a90b2a87
commit
d73ff274df
2 changed files with 29 additions and 0 deletions
|
@ -188,3 +188,16 @@ class TestAppProvider(TestCase):
|
|||
# but provider can supply the attr
|
||||
self.app.providers['mytest'] = MagicMock(foo_value='bar')
|
||||
self.assertEqual(self.app.foo_value, 'bar')
|
||||
|
||||
|
||||
class TestGenericHandler(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.config = WuttaConfig(appname='wuttatest')
|
||||
self.app = app.AppHandler(self.config)
|
||||
self.config.app = self.app
|
||||
|
||||
def test_constructor(self):
|
||||
handler = app.GenericHandler(self.config)
|
||||
self.assertIs(handler.config, self.config)
|
||||
self.assertIs(handler.app, self.app)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue