test_server: basic description checks
Change-Id: I732ac2349f7e7ab2579f67cc6e51989703531087
This commit is contained in:
parent
bc0925fca7
commit
bea994aaa2
@ -41,7 +41,7 @@ def log():
|
||||
return LoggerStub()
|
||||
|
||||
|
||||
PY_FILE = """Node('foonode', 'fodesc', 'fooface')
|
||||
PY_FILE = """Node('foonode', 'fodesc', 'fooface', _secnode_prop='secnode_prop')
|
||||
Mod('foo', 'frappy.modules.Readable', 'description', value=5)
|
||||
Mod('bar', 'frappy.modules.Readable', 'about me', export=False)
|
||||
Mod('baz', 'frappy.modules.Readable', 'things', value=Param(3, unit='BAR'))
|
||||
|
@ -37,11 +37,9 @@ class LoggerStub:
|
||||
def getChild(self, *args):
|
||||
return self
|
||||
|
||||
|
||||
def addHandler(self, *args):
|
||||
pass
|
||||
|
||||
|
||||
info = warning = exception = error = debug
|
||||
handlers = []
|
||||
|
||||
@ -61,3 +59,14 @@ def test_file(direc, log):
|
||||
"""only see that this does not throw. get config from cfgfiles."""
|
||||
s = Server('foo', log, cfgfiles='pyfile_cfg.py')
|
||||
s._processCfg()
|
||||
|
||||
|
||||
def test_basic_description(direc, log):
|
||||
"""only see that this does not throw. get config from cfgfiles."""
|
||||
s = Server('foo', log, cfgfiles='pyfile_cfg.py')
|
||||
s._processCfg()
|
||||
desc = s.secnode.get_descriptive_data('')
|
||||
# secnode properties correctly exported
|
||||
assert set(desc.keys()) == set(['modules', 'description', 'equipment_id', 'firmware', '_secnode_prop'])
|
||||
assert desc['_secnode_prop'] == 'secnode_prop'
|
||||
assert set(desc['modules'].keys()) == set(['foo', 'baz'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user