Ejemplo n.º 1
0
def test_is_handle():

    assert STCObject.is_handle('portx') == False

    portObject = STCObject.create('port', under='project1')

    assert STCObject.is_handle(portObject.handle)
Ejemplo n.º 2
0
def test_active():

    portObject = STCObject.create('port', under='project1')
    assert portObject.active == 'true'

    portObject.active = 'false'
    assert portObject.active == 'false'
Ejemplo n.º 3
0
def test_name():

    projectObject = STCObject.create('project')
    assert projectObject.name == 'Project 1'

    projectObject.name = 'xx'

    assert projectObject.name == 'xx'
Ejemplo n.º 4
0
def test_children():
    systemObject = STCObject('system1')
    rprObject = STCObject('resultproviderregistry1')
    print([child.handle for child in rprObject.children])
Ejemplo n.º 5
0
def test_attributes():
    systemObject = STCObject('system1')
    assert 'Active' in systemObject.attributes
    assert 'Name' in systemObject.attributes
    assert 'Version' in systemObject.attributes
    assert 'children' in systemObject.attributes
Ejemplo n.º 6
0
def test_parent():
    systemObject = STCObject('system1')
    assert systemObject.parent == None

    projectObject = STCObject('project1')
    assert projectObject.parent.handle == 'system1'
Ejemplo n.º 7
0
def test_handle():
    systemObject = STCObject('system1')
    assert systemObject.handle == 'system1'
Ejemplo n.º 8
0
def test_create():
    portObject = STCObject.create('port', under='project1')
    assert portObject.parent.handle == 'project1'
Ejemplo n.º 9
0
def test_type():
    projectObject = STCObject.create('project')
    assert projectObject.type == 'project'