

def test_text_export(self):
    '\n        Test the content type of an exported text file.\n        '
    url = urlresolvers.reverse('satchmo_admin_product_export')
    form_data = {
        'format': 'yaml',
        'include_images': False,
    }
    response = self.client.post(url, form_data)
    self.assertTrue(response.has_header('Content-Type'))
    self.assertEqual('text/yaml', response['Content-Type'])
    form_data['format'] = 'json'
    response = self.client.post(response, form_data)
    self.assertTrue(response.has_header('Content-Type'))
    self.assertEqual('text/json', response['Content-Type'])
    form_data['format'] = 'xml'
    response = self.client.post(url, form_data)
    self.assertTrue(response.has_header('Content-Type'))
    self.assertEqual('text/xml', response['Content-Type'])
    form_data['format'] = 'python'
    response = self.client.post(url, form_data)
    self.assertTrue(response.has_header('Content-Type'))
    self.assertEqual('text/python', response['Content-Type'])

dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/product/tests.py ProductExportTest.test_text_export/VarMisuse@89/158 `url`->`response`