'Test Edit Coupon Info Scenarios. Handle all the HttpResponses return by edit_coupon_info view'

def test_get_coupon_info(self):

    coupon = Coupon(code='AS452', description='asdsadsa', course_id=self.course.id.to_deprecated_string(), percentage_discount=10, created_by=self.instructor, expiration_date=(datetime.datetime.now(pytz.UTC) + datetime.timedelta(days=2)))
    coupon.save()
    edit_url = reverse('get_coupon_info', kwargs={'course_id': self.course.id.to_deprecated_string()})
    response = self.client.post(edit_url, {'id': coupon.id})
    self.assertIn('coupon    with    the    coupon    id    ({coupon_id})    updated    successfully'.format(coupon_id=coupon.id), response.content)
    self.assertIn(coupon.display_expiry_date, response.content)
    response = self.client.post(edit_url, {'id': 444444})
    self.assertIn('coupon    with    the    coupon    id    ({coupon_id})    DoesNotExist'.format(coupon_id=444444), response.content)
    response = self.client.post(edit_url, {'id': ''})
    self.assertIn('coupon    id    not    found"', response.content)
    coupon.is_active = False
    coupon.save()
    response = self.client.post(edit_url, {'id': coupon.id})
    self.assertIn('coupon    with    the    coupon    id    ({coupon_id})    is    already    inactive'.format(coupon_id=coupon.id), response.content)
