Skip to content
Snippets Groups Projects
Verified Commit 700c6cf0 authored by Karel Koci's avatar Karel Koci :metal:
Browse files

Fix name of uci.ExceptionNotFound in module

parent 786f2bbc
No related branches found
Tags v0.8
No related merge requests found
Pipeline #
......@@ -488,7 +488,7 @@ bool pyuci_object_init(PyObject *module) {
UciExcNotFound = PyErr_NewException("uci.UciExceptionNotFound", UciException, NULL);
Py_INCREF(UciExcNotFound);
PyModule_AddObject(module, "UciExcNotFound", UciExcNotFound);
PyModule_AddObject(module, "UciExceptionNotFound", UciExcNotFound);
return true;
}
......@@ -79,12 +79,12 @@ config testing 'testing'
u = uci.Uci(confdir=tmpdir.strpath)
u.delete('test', 'testing', 'one')
assert u.get('test', 'testing', 'two') == '1'
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'one')
u.delete('test', 'testing')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'two')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing')
......@@ -97,13 +97,13 @@ config testing 'testing'
""")
u = uci.Uci(confdir=tmpdir.strpath)
u.rename('test', 'testing', 'one', 'three')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'one')
assert u.get('test', 'testing', 'three') == '0'
u.rename('test', 'testing', 'deploy')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'three')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'two')
assert u.get('test', 'deploy', 'three') == '0'
assert u.get('test', 'deploy', 'two') == '1'
......@@ -155,7 +155,7 @@ def test_revert(tmpdir):
u.set('test', 'testing', 'variable', 'value')
assert u.get('test', 'testing', 'variable') == 'value'
u.revert('test')
with pytest.raises(uci.UciExcNotFound):
with pytest.raises(uci.UciExceptionNotFound):
u.get('test', 'testing', 'variable')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment