Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/p/l/plush_web-0.1.0/test/test_conf.py   plush_web(Download)
    def test_that_it_respects_defaults(self):
        conf = self.Configuration({})
 
        self.assertTrue(conf['static_path'] == '/static/')
 
    def test_that_it_respects_configuration(self):
        conf = self.Configuration(dict(STATIC_PATH='/'))
    def test_that_it_can_get_with_defaults(self):
        conf = self.Configuration({})
 
        self.assertTrue(conf.get('static_handler_class', 'Charlie'), 'Charlie')
 
    def test_that_it_preserves_contains_behaviour(self):
        conf = self.Configuration({})
    def test_that_we_forward_getitem_only_for_defined_settings(self):
        conf = self.Configuration({})
 
        for key in ('static_handler_class', 'log_function'):
            self.assertFalse(key in conf)