fix: add app handler methods: get_node_title()
, get_node_type()
This commit is contained in:
parent
bb7a83a73c
commit
1744e8706c
2 changed files with 61 additions and 0 deletions
|
@ -179,6 +179,28 @@ class TestAppHandler(TestCase):
|
|||
def test_get_title(self):
|
||||
self.assertEqual(self.app.get_title(), 'WuttJamaican')
|
||||
|
||||
def test_get_node_title(self):
|
||||
|
||||
# default
|
||||
self.assertEqual(self.app.get_node_title(), 'WuttJamaican')
|
||||
|
||||
# will fallback to app title
|
||||
self.config.setdefault('wuttatest.app_title', "WuttaTest")
|
||||
self.assertEqual(self.app.get_node_title(), 'WuttaTest')
|
||||
|
||||
# will read from config
|
||||
self.config.setdefault('wuttatest.node_title', "WuttaNode")
|
||||
self.assertEqual(self.app.get_node_title(), 'WuttaNode')
|
||||
|
||||
def test_get_node_type(self):
|
||||
|
||||
# default
|
||||
self.assertIsNone(self.app.get_node_type())
|
||||
|
||||
# will read from config
|
||||
self.config.setdefault('wuttatest.node_type', 'warehouse')
|
||||
self.assertEqual(self.app.get_node_type(), 'warehouse')
|
||||
|
||||
def test_get_distribution(self):
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue