(self)
| 301 | raise e |
| 302 | |
| 303 | def close(self) -> None: |
| 304 | self._check_session() |
| 305 | response = requests.post(f"https://scratch.mit.edu/site-api/classrooms/close_classroom/{self.id}/", |
| 306 | headers=self._headers, cookies=self._cookies) |
| 307 | |
| 308 | try: |
| 309 | response.json() |
| 310 | |
| 311 | except Exception as e: |
| 312 | warnings.warn(f"{self._session} may not be authenticated to edit {self}") |
| 313 | raise e |
| 314 | |
| 315 | def register_student(self, username: str, password: str = '', birth_month: Optional[int] = None, |
| 316 | birth_year: Optional[int] = None, |
no test coverage detected