Exemplo n.º 1
0
    def test_create_check_unit(self, unit, err):
        D = dict(unit=unit)

        if err:
            with pytest.raises(err):
                ModelVariable.check_create(**D)
        else:
            ModelVariable.check_create(**D)
Exemplo n.º 2
0
    def test_create_check_name(self):
        # supplying name in create params should raise an error
        with pytest.raises(ValueError):
            ModelVariable.check_create(name='heh ho')

        ModelVariable.check_create()