UpdateAdministratorsTest

Qualified name: intranet.apps.dataimport.tests.UpdateAdministratorsTest

class intranet.apps.dataimport.tests.UpdateAdministratorsTest(methodName='runTest')[source]

Bases: IonTestCase

Methods

administrator_of

run_command

setUp

test_all_students_from_db

--all runs the counselor chain over every student who has not graduated, with no CSV.

test_explicit_administrator_wins

An Administrator named in the CSV overrides what the counselor would imply.

test_graduation_years_from_db

--graduation-years narrows the run to the given classes.

test_inherits_from_counselor

With no Administrator column at all, every student takes their counselor's administrator.

test_only_teachers_match_a_surname

Administrators are teachers, so no other user type may be matched by surname.

test_reassigns_when_counselor_changes

A student whose counselor moved subschools follows their counselor's administrator.

test_requires_exactly_one_selection

A CSV and a database selection are mutually exclusive, and one of them is required.

test_unresolvable_rows_are_skipped

Rows that cannot be resolved are reported and skipped rather than aborting the run.

Attributes

test_all_students_from_db() None[source]

–all runs the counselor chain over every student who has not graduated, with no CSV.

test_explicit_administrator_wins() None[source]

An Administrator named in the CSV overrides what the counselor would imply.

test_graduation_years_from_db() None[source]

–graduation-years narrows the run to the given classes.

test_inherits_from_counselor() None[source]

With no Administrator column at all, every student takes their counselor’s administrator.

test_only_teachers_match_a_surname() None[source]

Administrators are teachers, so no other user type may be matched by surname.

test_reassigns_when_counselor_changes() None[source]

A student whose counselor moved subschools follows their counselor’s administrator.

test_requires_exactly_one_selection() None[source]

A CSV and a database selection are mutually exclusive, and one of them is required.

test_unresolvable_rows_are_skipped() None[source]

Rows that cannot be resolved are reported and skipped rather than aborting the run.