

def test_coupon_code_not_valid(self):
    ' Coupon code should not be processed, '
    self.login()
    params = {
        'coupon_code': None,
    }
    response = self.client.post(url_for('billing.coupon_code'), data=params, follow_redirects=True)
    data = json.loads(response.data)
    assert (response.status_code == 422)
    assert (data['error'] == _('Discount code cannot be processed.'))

dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/tests/billing/test_views.py TestBilling.test_coupon_code_not_valid/original