Skip to content

Commit

Permalink
chore: revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Oct 24, 2024
1 parent b860441 commit f31ecef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ def get_variants(self, product):
for key in variant_keys:
if key in product and product[key]:
if isinstance(product[key], list):
if key == 'futureVariants':
variants.extend([{'status': 'scheduled', **variant} for variant in product[key]])
else:
variants.extend(product[key])
variants.extend(product[key])
else:
variants.append(product[key])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ class TestPopulateExecutiveEducationDataCsv(CSVLoaderMixin, TestCase):

SUCCESS_API_RESPONSE_CUSTOM_AND_FUTURE_VARIANTS = copy.deepcopy(SUCCESS_API_RESPONSE)
SUCCESS_API_RESPONSE_CUSTOM_AND_FUTURE_VARIANTS['products'][0].update({
'customPresentations': [{**copy.deepcopy(variant_1), 'websiteVisibility': 'private'}],
'customPresentations': [{**copy.deepcopy(variant_1), 'websiteVisibility': 'private', 'status': 'active'}],
'futureVariants': [
{
**copy.deepcopy(variant_2), 'websiteVisibility': 'public',
'startDate': '2026-03-20', 'endDate': '2026-04-28', 'finalRegCloseDate': '2026-03-26'
**copy.deepcopy(variant_2), 'websiteVisibility': 'public', 'startDate': '2026-03-20',
'endDate': '2026-04-28', 'finalRegCloseDate': '2026-03-26', 'status': 'active'
}
]})

Expand Down

0 comments on commit f31ecef

Please sign in to comment.