[pygobject] tests: Remove usage of deprecated "schema" property in GSettings creation



commit 804b89447ae2748c88ad5efe5e6e37d949681b9e
Author: Simon Feltman <sfeltman src gnome org>
Date:   Fri Jul 25 17:40:36 2014 -0700

    tests: Remove usage of deprecated "schema" property in GSettings creation
    
    Use new and new_with_path instead as the schema property was causing a
    hard warning which fails the test suite.

 tests/test_gio.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/test_gio.py b/tests/test_gio.py
index 986d6dc..180b9a8 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -40,7 +40,7 @@ class TestGio(unittest.TestCase):
 
 class TestGSettings(unittest.TestCase):
     def setUp(self):
-        self.settings = Gio.Settings(schema='org.gnome.test')
+        self.settings = Gio.Settings.new('org.gnome.test')
         # we change the values in the tests, so set them to predictable start
         # value
         self.settings.reset('test-string')
@@ -78,7 +78,7 @@ class TestGSettings(unittest.TestCase):
         self.assertEqual(self.settings.get_property('path'), '/tests/')
 
         # optional constructor arguments
-        with_path = Gio.Settings(schema='org.gnome.nopathtest', path='/mypath/')
+        with_path = Gio.Settings.new_with_path('org.gnome.nopathtest', '/mypath/')
         self.assertEqual(with_path.get_property('path'), '/mypath/')
         self.assertEqual(with_path['np-int'], 42)
 
@@ -115,7 +115,7 @@ class TestGSettings(unittest.TestCase):
         self.assertRaises(KeyError, self.settings.__setitem__, 'unknown', 'moo')
 
     def test_empty(self):
-        empty = Gio.Settings(schema='org.gnome.empty', path='/tests/')
+        empty = Gio.Settings.new_with_path('org.gnome.empty', '/tests/')
         self.assertEqual(len(empty), 0)
         self.assertEqual(bool(empty), True)
         self.assertEqual(empty.keys(), [])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]