intranet.apps.eighth.tests package

Subpackages

Submodules

intranet.apps.eighth.tests.eighth_test module

class intranet.apps.eighth.tests.eighth_test.EighthAbstractTest(methodName='runTest')[source]

Bases: IonTestCase

Base class to be inherited by the test cases for the Eighth app.

add_activity(name: str, **args) EighthActivity[source]

Add an EighthActivity.

Parameters:
  • name – The name of the activity to add

  • args – The remaining arguments are passed to add_activity_view().

Returns:

The EighthActivity added.

add_block(date: str, block_letter: str, **kwargs) EighthBlock[source]

Adds an EighthBlock. Arguments are passed to intranet.apps.eighth.forms.admin.blocks.QuickBlockForm.

Parameters:
  • date – Date in YYYY-MM-DD format

  • block_letter – The corresponding block letter

Returns:

The EighthBlock that was created.

add_room(name: str, capacity: int = 1, **kwargs) EighthRoom[source]

Adds an EighthRoom. Arguments are passed to intranet.apps.eighth.forms.admin.rooms.RoomForm.

Parameters:
  • name – The name of the room.

  • capacity – The room capacity.

Returns:

The EighthRoom created.

create_sponsor() User[source]

Creates a teacher.

Returns:

a User object that is a teacher

schedule_activity(block_id: int, activity_id: int, capacity: int = 1) EighthScheduledActivity[source]

Creates an EighthScheduledActivity; aka schedule an eighth period activity.

Parameters:
  • block_id – The block ID

  • activity_id – Activity ID

  • capacity – Maximum capacity for this activity

Returns:

The EighthScheduledActivity created.

setUp()[source]
verify_signup(user: User, schact: EighthScheduledActivity)[source]

intranet.apps.eighth.tests.test_activities module

class intranet.apps.eighth.tests.test_activities.EighthActivitiesTestCase(methodName='runTest')[source]

Bases: EighthAbstractTest

Test cases for views.activities.

test_activity_stats()[source]
test_calculate_statistics()[source]
test_generate_statistics_pdf()[source]
test_past_activities_listed_properly()[source]
test_stats_global_view()[source]
test_stats_view()[source]

intranet.apps.eighth.tests.test_attendance module

class intranet.apps.eighth.tests.test_attendance.EighthAttendanceTestCase(methodName='runTest')[source]

Bases: EighthAbstractTest

Test cases for views.attendance.

test_accept_all_passes_view()[source]

Tests accept_all_passes_view().

test_accept_pass_view()[source]

Tests accept_pass_view().

test_attendance_export_csv()[source]

Tests the “export CSV” function in take_attendance_view().

test_eighth_absences_view()[source]

Tests eighth_absences_view().

test_email_students_view()[source]

Tests email_students_view().

test_generate_roster_pdf()[source]

Tests generate_roster_pdf()

test_raw_roster_view()[source]

Tests raw_roster_view().

test_raw_waitlist_view()[source]

Tests raw_waitlist_view().

test_roster_view()[source]

Tests roster_view().

test_sponsor_schedule_widget_view()[source]

Tests sponsor_schedule_widget_view().

test_take_attendance()[source]

Makes sure that taking attendance for activities with multiple students signed up works.

test_take_attendance_clear_bit()[source]

Tests the “clear attendance bit” feature.

test_take_attendance_google_meet_csv()[source]

Make sure taking attendance through an uploaded Google Meet file works.

test_teacher_choose_scheduled_activity_view()[source]

Tests teacher_choose_scheduled_activity_view().

intranet.apps.eighth.tests.test_commands module

class intranet.apps.eighth.tests.test_commands.EighthCommandsTest(methodName='runTest')[source]

Bases: EighthAbstractTest

test_absence_email()[source]

Tests the absence_email command.

test_delete_duplicate_signups()[source]

Tests the delete duplicate signups command.

test_dev_create_blocks()[source]

Tests the dev_create_blocks command.

test_dev_generate_signups()[source]

Tests the dev_generate_signups command.

test_find_duplicates()[source]

Tests the find duplicates command.

test_generate_similarities()[source]

Tests the generate_similarities command.

test_generate_statistics()[source]

Tests the generate_statistics command.

test_remove_withdrawn_students()[source]

Tests the remove_withdrawn_students command.

test_signup_statistics()[source]

Tests the signup_statistics command.

test_signup_status_email()[source]

Tests the signup_status_email command.

test_update_counselor()[source]

intranet.apps.eighth.tests.test_exceptions module

class intranet.apps.eighth.tests.test_exceptions.EighthExceptionTest(methodName='runTest')[source]

Bases: IonTestCase

test_signup_exception()[source]

intranet.apps.eighth.tests.test_general module

class intranet.apps.eighth.tests.test_general.EighthTest(methodName='runTest')[source]

Bases: EighthAbstractTest

Tests for the eighth module.

test_absence_email()[source]
test_active_schedulings()[source]
test_all_associated_rooms()[source]

Make sure EighthScheduledActivities can return all associated rooms.

test_blacklist()[source]

Make sure users cannot sign up for blacklisted activities.

test_both_blocks()[source]

Make sure that signing up for a both blocks activity works.

test_cancel_uncancel()[source]
test_passes()[source]
test_room_formatting()[source]

Make sure a room name formatting is correct.

test_room_use()[source]

Make sure EighthScheduledActivities return the correct room.

test_signup_status_email()[source]
test_signups()[source]

Do some sample signups.

test_sponsor()[source]
test_switch_cancelled_sticky()[source]

Make sure users can switch out of cancelled activities even if they are stickied in.

test_total_capacity()[source]
test_true_capacity()[source]

intranet.apps.eighth.tests.test_monitoring module

class intranet.apps.eighth.tests.test_monitoring.EighthMonitoringTest(methodName='runTest')[source]

Bases: EighthAbstractTest

test_metrics_view()[source]

Tests metrics_view().

intranet.apps.eighth.tests.test_profile module

class intranet.apps.eighth.tests.test_profile.EighthProfileTest(methodName='runTest')[source]

Bases: EighthAbstractTest

test_edit_profile_view()[source]

Tests edit_profile_view().

test_profile_history_view()[source]

Tests profile_history_view().

test_profile_often_view()[source]

Tests profile_often_view().

test_profile_signup_view()[source]

Tests profile_signup_view().

test_profile_view()[source]

Tests profile_view().

intranet.apps.eighth.tests.test_routers module

class intranet.apps.eighth.tests.test_routers.EighthAttendanceTestCase(methodName='runTest')[source]

Bases: EighthAbstractTest

Test cases for views.routers.

test_eighth_redirect_view()[source]

Tests eighth_redirect_view().

intranet.apps.eighth.tests.test_signup module

class intranet.apps.eighth.tests.test_signup.EighthSignupTest(methodName='runTest')[source]

Bases: EighthAbstractTest

test_add_user_method()[source]

Tests the EighthScheduledActivity add_user() method.

test_eighth_location_view()[source]

Tests eighth_location().

test_eighth_multi_signup_view()[source]

Tests eighth_multi_signup_view().

test_eighth_signup_view()[source]

Tests eighth_signup_view().

test_set_sticky_students()[source]

Test set_sticky_students().

test_signup_restricitons()[source]

Make sure users can’t sign up for restricted activities or switch out of sticky activities.

test_signup_user_view()[source]

Tests adding a user to a EighthScheduledActivity.

test_toggle_favorite_view()[source]

Tests toggle_favorite_view().

test_user_stickied()[source]

Test that stickying an individual user into an activity works.

Module contents