def test_vanilla(self):
        environments = {
            NeckbeardLoader.VERSION_OPTION: '0.1',
            'test1': {
                'name': 'test1',
                'aws_nodes': {
                    'ec2': {
                        'web0': {
                            "name": "web0",
                            "unique_id": "web0-{{ node.scaling_index }}",
                        },
                        'web1': {
                            "name": "web1",
                            "unique_id": "web1-{{ node.scaling_index }}",
                            "scaling": {
                                "minimum": 1,
                                "maximum": 2,
                            },
                        },
                    },
                    'baz': {
                        'master': {
                            "name": "master",
                            "unique_id": "master",
                        },
                    },
                },
            },
        }
        configuration = ConfigurationManager(
            environments=environments,
            scaling_backend=MaxScalingBackend(),
        )
        output_dir = path.join(self.tmp_dir, 'test1')
        configuration.dump_environment_config(
            'test1',
            output_dir,
        )

        # Ensure we created the expected `resource_type` directories
        self.assertTrue(path.exists(output_dir))
        for resource_type in ['ec2', 'baz']:
            resource_type_dir = path.join(output_dir, resource_type)
            self.assertTrue(path.exists(resource_type_dir))

        # Ensure the individual resource JSON files exist and that they have
        # some content
        ec2_dir = path.join(output_dir, 'ec2')
        for unique_id in ['web0-0', 'web1-0', 'web1-1']:
            resource_path = path.join(ec2_dir, '%s.json' % unique_id)
            self.assertTrue(path.exists(resource_path))
            with open(resource_path, 'r') as fp:
                data = json.load(fp)
            self.assertEqual(data['unique_id'], unique_id)

        # Same thing for baz
        baz_dir = path.join(output_dir, 'baz')
        unique_id = 'master'
        resource_path = path.join(baz_dir, unique_id % '%s.json')
        self.assertTrue(path.exists(resource_path))
        with open(resource_path, 'r') as fp:
            data = json.load(fp)
        self.assertEqual(data['unique_id'], unique_id)
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/tests/test_configuration.py/TestFileDumping.test_vanilla/swapped operands of `%`