'Authenticated users eligible for one click purchase should see the purchase button
- displaying program\'s discounted price if it exists.
- leading to ecommerce basket page'

@httpretty.activate
def test_fetching_program_discounted_price(self):

    self._prepare_program_for_discounted_price_calculation_endpoint()
    mock_discount_data = {'total_incl_tax_excl_discounts': 200.0, 'currency': 'USD', 'total_incl_tax': 50.0}
    httpretty.register_uri(httpretty.GET, self.ECOMMERCE_CALCULATE_DISCOUNT_ENDPOINT, body=json.dumps(mock_discount_data), content_type='application/json')
    data = ProgramMarketingDataExtender(self.program, self.user).extend()
    self._update_discount_data(mock_discount_data)
    self.assertEqual(data['skus'], [course['course_runs'][0]['seats'][0]['sku'] for course in self.program['courses']])
    self.assertEqual(data['discount_data'], mock_discount_data)
