Commit 4ea37c60 authored by Paolo Borelli's avatar Paolo Borelli Committed by Martin Pitt
Browse files

Add null_gerror_callback unit test

This models the case where the callback is successful and does not set
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=669415
parent a4198478
......@@ -362,6 +362,15 @@ class TestCallbacks(unittest.TestCase):
Everything.test_gerror_callback(callback)
self.assertTrue(TestCallbacks.called)
def test_callback_null_gerror(self):
def callback(error):
self.assertEqual(error, None)
TestCallbacks.called = True
TestCallbacks.called = False
Everything.test_null_gerror_callback(callback)
self.assertTrue(TestCallbacks.called)
def test_callback_owned_gerror(self):
def callback(error):
self.assertEqual(error.message, 'regression test owned error')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment