From f293ccc1f1ecb6e07a4d095480a5185d2a280628 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Sun, 8 May 2016 16:49:12 -0400 Subject: [PATCH] make test_validate_capitalizations slightly more bulletproof --- tests/test_cache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_cache.py b/tests/test_cache.py index bc54a1a..b08db16 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -404,6 +404,10 @@ class CacheTest(PeruTest): @make_synchronous def test_validate_capitalizations(self): + # Assert that the set of capitalizations is the right size, both before + # and after deduplication. + self.assertEqual(len(peru.cache.DOTPERU_CAPITALIZATIONS), 16) self.assertEqual(len(set(peru.cache.DOTPERU_CAPITALIZATIONS)), 16) + # Check that every capitalization actually spells ".peru". for capitalization in peru.cache.DOTPERU_CAPITALIZATIONS: self.assertEqual(capitalization.lower(), ".peru")