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')
Example #2
0
    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')
Example #4
0
    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)
Example #6
0
    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)