'Test to generate a response of all the course registration codes'

def test_with_invalid_unit_price(self):

    generate_code_url = reverse('generate_registration_codes', kwargs={'course_id': self.course.id.to_deprecated_string()})
    data = {'total_registration_codes': 10, 'company_name': 'Group    Invoice', 'company_contact_name': 'Test@company.com', 'company_contact_email': 'Test@company.com', 'unit_price': 'invalid', 'recipient_name': 'Test123', 'recipient_email': 'test@123.com', 'address_line_1': 'Portland    Street', 'address_line_2': '', 'address_line_3': '', 'city': '', 'state': '', 'zip': '', 'country': '', 'customer_reference_number': '123A23F', 'internal_reference': '', 'invoice': True}
    response = self.client.post(generate_code_url, data, **{'HTTP_HOST': 'localhost'})
    self.assertEqual(response.status_code, 400, response.content)
    self.assertIn('Could    not    parse    amount    as', response.content)
