Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed Sep 19, 2024
1 parent d3fe581 commit 0134882
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 44 deletions.
2 changes: 0 additions & 2 deletions enterprise_access/apps/content_assignments/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,6 @@ def _get_parent_content_key(assignment_configuration, content_key):
course_content_metadata = _get_content_summary(assignment_configuration, content_key)
metadata_content_key = course_content_metadata.get('content_key')

print('_get_parent_content_key?!: ', metadata_content_key, content_key)

# Check if the assignment's content_key matches the returned content_key. If so, this is a course key
# which has no parent key.
if content_key == metadata_content_key:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,6 @@ def handle(self, *args, **options):
else False
)

print(
'NUDGE?!?!?!:',
{
'assignment_uuid': str(assignment.uuid),
'content_key': assignment.content_key,
'parent_content_key': assignment.parent_content_key,
'start_date': start_date,
'datetime_start_date': datetime_start_date,
'num_days': days_before_course_start_date,
'result': can_send_nudge_notification_in_advance,
},
)

if not can_send_nudge_notification_in_advance:
logger.info(
(
Expand Down
29 changes: 0 additions & 29 deletions enterprise_access/apps/content_assignments/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,6 @@ def test_allocate_assignments_happy_path(
'state': LearnerContentAssignmentStateChoices.ERRORED,
})

for assignment in LearnerContentAssignment.objects.all():
print(
'original assignment:',
str(assignment.uuid),
assignment.learner_email,
assignment.state,
assignment.content_key,
assignment.parent_content_key,
assignment.is_assigned_course_run,
assignment.preferred_course_run_key,
)

allocation_results = allocate_assignments(
self.assignment_configuration,
learners_to_assign,
Expand Down Expand Up @@ -544,19 +532,6 @@ def test_allocate_assignments_happy_path(
for record in assignments_to_refresh:
record.refresh_from_db()

for assignment in LearnerContentAssignment.objects.all():
print(
'assignment after allocation:',
str(assignment.uuid),
assignment.learner_email,
assignment.state,
assignment.content_key,
assignment.parent_content_key,
assignment.is_assigned_course_run,
assignment.preferred_course_run_key,
)


# Create list of assignments expected to be updated, including:
# - The allocated assignments with outdated: preferred course run, parent_content_key, is_assigned_course_run.
# - Errored assignments
Expand All @@ -577,16 +552,12 @@ def test_allocate_assignments_happy_path(
allocated_assignment_old_run_based,
)

print('actual updated uuids:', {str(record.uuid) for record in allocation_results['updated']})

if is_assigned_course_run:
expected_updated_assignments += (
allocated_assignment_old_parent_content_key,
allocated_assignment_old_run_based,
)

print('expected updated uuids:', {str(record.uuid) for record in expected_updated_assignments})

self.assertEqual(
{record.uuid for record in allocation_results['updated']},
{assignment.uuid for assignment in expected_updated_assignments},
Expand Down

0 comments on commit 0134882

Please sign in to comment.