diff options
author | 2020-03-03 22:53:19 -0500 | |
---|---|---|
committer | 2020-03-03 22:55:25 -0500 | |
commit | aae928ebc06e7e7a6ed5b5b848464ce95e4ea9d8 (patch) | |
tree | 181e4588240a4d955d53f86e77990f496fd07557 /tests | |
parent | Add pep8-naming & relock (diff) |
Remove CaseInsensitiveDict
This was added by the now-removed Snake cog & is not used elsewhere on bot.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/test_utils.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/bot/test_utils.py b/tests/bot/test_utils.py deleted file mode 100644 index d7bcc3ba6..000000000 --- a/tests/bot/test_utils.py +++ /dev/null @@ -1,37 +0,0 @@ -import unittest - -from bot import utils - - -class CaseInsensitiveDictTests(unittest.TestCase): - """Tests for the `CaseInsensitiveDict` container.""" - - def test_case_insensitive_key_access(self): - """Tests case insensitive key access and storage.""" - instance = utils.CaseInsensitiveDict() - - key = 'LEMON' - value = 'trees' - - instance[key] = value - self.assertIn(key, instance) - self.assertEqual(instance.get(key), value) - self.assertEqual(instance.get(key.casefold()), value) - self.assertEqual(instance.pop(key.casefold()), value) - self.assertNotIn(key, instance) - self.assertNotIn(key.casefold(), instance) - - instance.setdefault(key, value) - del instance[key] - self.assertNotIn(key, instance) - - def test_initialization_from_kwargs(self): - """Tests creating the dictionary from keyword arguments.""" - instance = utils.CaseInsensitiveDict({'FOO': 'bar'}) - self.assertEqual(instance['foo'], 'bar') - - def test_update_from_other_mapping(self): - """Tests updating the dictionary from another mapping.""" - instance = utils.CaseInsensitiveDict() - instance.update({'FOO': 'bar'}) - self.assertEqual(instance['foo'], 'bar') |