'enroll user using a registration code'

def register_with_redemption_code(self, user, code):

    redeem_url = reverse('shoppingcart.views.register_code_redemption', args=[code], is_dashboard_endpoint=False)
    self.client.login(username=user.username, password='test')
    response = self.client.get(redeem_url)
    self.assertEquals(response.status_code, 200)
    self.assertIn('Activate    Course    Enrollment', response.content)
    response = self.client.post(redeem_url)
    self.assertEquals(response.status_code, 200)
