Пример #1
0
def test_getobject():
    """py.test for getobject"""
    thedata = (
        ('ZONE', 'PLENUM-1', bunchdt['ZONE'][0]), # key, name, theobject
        ('ZONE', 'PLENUM-1'.lower(), bunchdt['ZONE'][0]), # key, name, theobject
        ('ZONE', 'PLENUM-A', None), # key, name, theobject
        ('ZONEHVAC:EQUIPMENTCONNECTIONS', 'SPACE1-1',
         bunchdt['ZONEHVAC:EQUIPMENTCONNECTIONS'][0]), # key, name, theobject
    )
    for key, name, theobject in thedata:
        result = modeleditor.getobject(bunchdt, key, name)
        assert result == theobject