|
9 | 9 | ChannelDoesNotExistError, |
10 | 10 | CommitteeRoleDoesNotExistError, |
11 | 11 | DiscordMemberNotInMainGuildError, |
| 12 | + GuestRoleDoesNotExistError, |
12 | 13 | GuildDoesNotExistError, |
13 | 14 | ImproperlyConfiguredError, |
14 | 15 | InvalidMessagesJSONFileError, |
@@ -778,6 +779,30 @@ class TestGuestRoleDoesNotExistError: |
778 | 779 | from its parent class so is already unit-tested in the parent class's dedicated test case. |
779 | 780 | """ |
780 | 781 |
|
| 782 | + def test_guest_role_does_not_exist_error_code(self) -> None: |
| 783 | + """Test that the error code is set correctly.""" |
| 784 | + assert "E1022" in (GuestRoleDoesNotExistError().ERROR_CODE) |
| 785 | + |
| 786 | + def test_guest_role_does_not_exist_error_default_message(self) -> None: |
| 787 | + """Test that the default message is correct.""" |
| 788 | + assert ( |
| 789 | + GuestRoleDoesNotExistError.DEFAULT_MESSAGE |
| 790 | + == 'Role with name "Guest" does not exist.' |
| 791 | + ) |
| 792 | + |
| 793 | + def test_guest_role_does_not_exist_dependent_commands(self) -> None: |
| 794 | + """Test that the dependent commands are set correctly.""" |
| 795 | + assert ( |
| 796 | + frozenset({ |
| 797 | + "induct", |
| 798 | + "stats", |
| 799 | + "archive", |
| 800 | + "ensure-members-inducted", |
| 801 | + "increment-year-channels", |
| 802 | + }) |
| 803 | + == GuestRoleDoesNotExistError.DEPENDENT_COMMANDS |
| 804 | + ) |
| 805 | + |
781 | 806 |
|
782 | 807 | class TestMemberRoleDoesNotExistError: |
783 | 808 | """ |
|
0 commit comments