def test_build_node_data_bag_nonalphanumeric(self):
        chef.build_node_data_bag()
        # A node called testnode3.mydomain.com will have the data bag id
        # 'testnode3', because dots are not allowed.
        filename = 'testnode3_mydomain_com'
        nodename = filename.replace("_", ".")
        item_path = os.path.join('data_bags', 'node', filename + '.json')
        self.assertTrue(os.path.exists(item_path), "node file does not exist")
        with open(item_path, 'r') as f:
            data = json.loads(f.read())
        self.assertTrue('id' in data and data['id'] == filename)
        self.assertTrue('name' in data and data['name'] == nodename)
Should create a node data bag when node name contains invalid chars
dataset/ETHPy150Open tobami/littlechef/tests/test_lib.py/TestChef.test_build_node_data_bag_nonalphanumeric