Beispiel #1
0
def test_iddofobject():
    """py.test of iddofobject"""
    thedata = (
        (
            "VERSION",
            [
                {
                    "idfobj": "Version",
                    "group": "Simulation Parameters",
                    "format": ["singleLine"],
                    "unique-object": [""],
                },
                {
                    "default": ["7.0"],
                    "field": ["Version Identifier"],
                    "required-field": [""],
                },
            ],
        ),  # key, itsidd
    )
    for key, itsidd in thedata:
        result = modeleditor.iddofobject(data, commdct, key)
        try:
            result[0].pop("memo")  # memo is new in version 8.0.0
        except KeyError:
            pass
        assert result == itsidd
Beispiel #2
0
def test_iddofobject():
    """py.test of iddofobject"""
    thedata = (('VERSION', 
                [{'format': ['singleLine'], 'unique-object': ['']},
                {'default': ['7.0'], 'field': ['Version Identifier'], 
                'required-field': ['']}]), # key, itsidd
    )
    for key, itsidd in thedata:
        result = modeleditor.iddofobject(data, commdct, key)
        try:
            result[0].pop('memo') # memo is new in version 8.0.0
        except KeyError as e:
            pass
        assert result == itsidd
Beispiel #3
0
def test_iddofobject():
    """py.test of iddofobject"""
    thedata = (
        ('VERSION', [{
            'format': ['singleLine'],
            'unique-object': ['']
        }, {
            'default': ['7.0'],
            'field': ['Version Identifier'],
            'required-field': ['']
        }]),  # key, itsidd
    )
    for key, itsidd in thedata:
        result = modeleditor.iddofobject(data, commdct, key)
        try:
            result[0].pop('memo')  # memo is new in version 8.0.0
        except KeyError:
            pass
        assert result == itsidd