Ejemplo n.º 1
0
    def test_010_config_manager(self):
        """ Test writing config out, using the internally-specified config file.
        """
        with open(self.valid_file, 'r') as f:
            old_json = json.load(f)

        cfg = ConfigManager(self.valid_file)
        cfg.write()

        with open(self.valid_file, 'r') as f:
            new_json = json.load(f)

        self.assertEqual(old_json, new_json)
Ejemplo n.º 2
0
    def test_009_config_manager(self):
        """ Test writing config to a specified output file.
        """
        with open(self.valid_file, 'r') as f:
            old_json = json.load(f)

        cfg = ConfigManager(self.valid_file)
        cfg.write(self.valid_file)

        with open(self.valid_file, 'r') as f:
            new_json = json.load(f)

        self.assertEqual(old_json, new_json)
Ejemplo n.º 3
0
    def test_010_config_manager(self):
        """ Test writing config out, using the internally-specified config file.
        """
        with open(self.valid_file, 'r') as f:
            old_json = json.load(f)

        cfg = ConfigManager(self.valid_file)
        cfg.write()

        with open(self.valid_file, 'r') as f:
            new_json = json.load(f)

        self.assertEqual(old_json, new_json)
Ejemplo n.º 4
0
    def test_009_config_manager(self):
        """ Test writing config to a specified output file.
        """
        with open(self.valid_file, 'r') as f:
            old_json = json.load(f)

        cfg = ConfigManager(self.valid_file)
        cfg.write(self.valid_file)

        with open(self.valid_file, 'r') as f:
            new_json = json.load(f)

        self.assertEqual(old_json, new_json)
Ejemplo n.º 5
0
 def test_011_config_manager(self):
     """ Test writing config out, with no output file specified.
     """
     cfg = ConfigManager()
     with self.assertRaises(ValueError):
         cfg.write()
Ejemplo n.º 6
0
 def test_011_config_manager(self):
     """ Test writing config out, with no output file specified.
     """
     cfg = ConfigManager()
     with self.assertRaises(ValueError):
         cfg.write()