EighthAbstractTest¶
Qualified name: intranet.apps.eighth.tests.eighth\_test.EighthAbstractTest
- 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.
Methods
Add an EighthActivity.
Adds an EighthBlock.
Adds an EighthRoom.
Creates a teacher.
Creates an EighthScheduledActivity; aka schedule an eighth period activity.
setUp
verify_signup
Attributes
- 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.
- 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.