def test_add_authfile(self): conf = ConfigFacade(self.conf_struct_base + self.conf_struct_tickets) conf.set_authfile("/path/to/auth.file") self.assertEqual( conf.config, ([ConfigItem("authfile", "/path/to/auth.file", [])] + self.conf_struct_base + self.conf_struct_tickets), )
def test_change_authfile(self): conf = ConfigFacade( self.conf_struct_base + [ ConfigItem("authfile", "/old/path/to/auth1.file", []), ConfigItem("authfile", "/old/path/to/auth2.file", []), ] + self.conf_struct_tickets ) conf.set_authfile("/path/to/auth.file") self.assertEqual( conf.config, ( [ConfigItem("authfile", "/path/to/auth.file", [])] + self.conf_struct_base + self.conf_struct_tickets ) )