'Verifies that the view returns HTTP 406 when a course with no honor or audit mode is encountered.'

def assertProfessionalModeBypassed(self):

    CourseMode.objects.filter(course_id=self.course.id).delete()
    mode = CourseMode.NO_ID_PROFESSIONAL_MODE
    sku_string = uuid4().hex.decode('ascii')
    CourseModeFactory.create(course_id=self.course.id, mode_slug=mode, mode_display_name=mode, sku=sku_string, bulk_sku='BULK-{}'.format(sku_string))
    with mock_create_basket(expect_called=False):
        response = self._post_to_view()
    self.assertEqual(response.status_code, 406)
    msg = Messages.NO_DEFAULT_ENROLLMENT_MODE.format(course_id=self.course.id)
    self.assertResponseMessage(response, msg)
