def METHOD_NAME(self):
    """Test BOM download in CSV format."""
    params = {
        'format': 'csv',
        'cascade': True,
        'parameter_data': True,
        'stock_data': True,
        'supplier_data': True,
        'manufacturer_data': True,
    }
    response = self.client.get(self.url, data=params)
    self.assertEqual(response.status_code, 200)
    content = response.headers['Content-Disposition']
    self.assertEqual(content, 'attachment; filename="BOB | Bob | A2_BOM.csv"')
    filename = '_tmp.csv'
    with open(filename, 'wb') as f:
        f.write(response.getvalue())
    # Read the file
    with open(filename, 'r') as f:
        reader = csv.reader(f, delimiter=',')
        for line in reader:
            headers = line
            break
        expected = [
            'BOM Level',
            'BOM Item ID',
            'Parent ID',
            'Parent IPN',
            'Parent Name',
            'Part ID',
            'Part IPN',
            'Part Name',
            'Description',
            'Assembly',
            'Quantity',
            'optional',
            'consumable',
            'overage',
            'Reference',
            'Note',
            'inherited',
            'allow_variants',
            'Default Location',
            'Total Stock',
            'Available Stock',
            'On Order',
        ]
        for header in expected:
            self.assertIn(header, headers)
        for header in headers:
            self.assertIn(header, expected)