    def test_coupon_redeem_count_in_ecommerce_section(self):
        """
        Test that checks the redeem count in the instructor_dashboard coupon section
        """
        # add the coupon code for the course
        coupon = Coupon(
            code='test_code', description='test_description', course_id=self.course.id,
            percentage_discount='10', created_by=self.instructor, is_active=True
        )
        coupon.save()

        # Coupon Redeem Count only visible for Financial Admins.
        CourseFinanceAdminRole(self.course.id).add_users(self.instructor)

        PaidCourseRegistration.add_to_order(self.cart, self.course.id)
        # apply the coupon code to the item in the cart
        resp = self.client.post(reverse('shoppingcart.views.use_code'), {'code': coupon.code})
        self.assertEqual(resp.status_code, 200)

        # URL for instructor dashboard
        instructor_dashboard = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
        # visit the instructor dashboard page and
        # check that the coupon redeem count should be 0
        resp = self.client.get(instructor_dashboard)
        self.assertEqual(resp.status_code, 200)
        self.assertIn('Number Redeemed', resp.content)
        self.assertIn('<td>0</td>', resp.content)

        # now make the payment of your cart items
        self.cart.purchase()
        # visit the instructor dashboard page and
        # check that the coupon redeem count should be 1
        resp = self.client.get(instructor_dashboard)
        self.assertEqual(resp.status_code, 200)

        self.assertIn('Number Redeemed', resp.content)
        self.assertIn('<td>1</td>', resp.content)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.