Skip to content

Commit 683697a

Browse files
serhiy-storchakazvynclaude
authored
[3.14] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153081)
(cherry picked from commit 3cd6b74) Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 33396b9 commit 683697a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/test/test_imaplib.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,16 @@ def test_xatom(self):
17311731
self.assertEqual(data, [b'MYCOMMAND completed'])
17321732
self.assertEqual(server.args, ['arg1', 'arg2'])
17331733

1734+
def test_uppercase_command_names(self):
1735+
client, server = self._setup(SimpleIMAPHandler)
1736+
client.login('user', 'pass')
1737+
self.assertEqual(client.CAPABILITY, client.capability)
1738+
self.assertEqual(client.SELECT, client.select)
1739+
typ, data = client.CAPABILITY()
1740+
self.assertEqual(typ, 'OK')
1741+
with self.assertRaises(AttributeError):
1742+
client.NONEXISTENT
1743+
17341744
# property tests
17351745

17361746
def test_file_property_should_not_be_accessed(self):

0 commit comments

Comments
 (0)