Skip to content

Commit

Permalink
Test boolean properties. Closes gh-157
Browse files Browse the repository at this point in the history
  • Loading branch information
piotras committed Mar 19, 2012
1 parent bcc59a8 commit 7dee9b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/GIR/test_000_config.py
Expand Up @@ -38,6 +38,16 @@ def testProperties(self):
self.assertNotEqual(config.get_property("dbdir"), "/tmp/test")
self.assertFalse(hasattr(config.props, "notexists"))

def testBooleanProperties(self):
config = Midgard.Config()
boolean_properties = { "tablecreate", "tableupdate", "gdathreads" }
for prop in boolean_properties:
self.assertTrue(hasattr(config.props, prop))
config.set_property(prop, True)
self.assertTrue(config.get_property(prop))
config.set_property(prop, False)
self.assertFalse(config.get_property(prop))

def testReadFileAtPath(self):
config = Midgard.Config()
self.assertTrue(config.read_file_at_path("./test_SQLITE.conf"))
Expand Down

0 comments on commit 7dee9b8

Please sign in to comment.