def testByEnvironment(self): # Create the lookup file to demonstrate it is overridden. self.makeLookupFile() os.environ['LPCONFIG'] = 'from_env' self.failUnlessEqual(config.find_instance_name(), 'from_env')
def testByFile(self): # Create the lookup file. self.makeLookupFile() # Trash the environment variable so it doesn't override. del os.environ['LPCONFIG'] self.failUnlessEqual(config.find_instance_name(), 'from_disk')
def testByDefault(self): # Trash the environment variable so it doesn't override. del os.environ['LPCONFIG'] self.failUnlessEqual( config.find_instance_name(), config.DEFAULT_CONFIG)
def testByDefault(self): # Trash the environment variable so it doesn't override. del os.environ['LPCONFIG'] self.failUnlessEqual(config.find_instance_name(), config.DEFAULT_CONFIG)