'Verify that pushing a mode with a professional certificate and an expiration datetime
will be rejected (this is not allowed).'

@ddt.data(*itertools.product(('honor', 'audit', 'verified', 'professional', 'no-id-professional'), (datetime.now(), None)))
@ddt.unpack
def test_update_professional_expiration(self, mode_slug, expiration_datetime):

    mode = self._serialize_course_mode(CourseMode(mode_slug=mode_slug, min_price=500, currency=u'USD', sku=u'ABC123', bulk_sku=u'BULK-ABC123', expiration_datetime=expiration_datetime))
    course_id = unicode(self.course.id)
    payload = {u'id': course_id, u'modes': [mode]}
    path = reverse('commerce_api:v1:courses:retrieve_update', args=[course_id])
    expected_status = (400 if (CourseMode.is_professional_slug(mode_slug) and (expiration_datetime is not None)) else 200)
    response = self.client.put(path, json.dumps(payload), content_type=JSON_CONTENT_TYPE)
    self.assertEqual(response.status_code, expected_status)
