From d4c1ceccac2da9484b021c3471e2798d365baca6 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Mon, 16 Feb 2015 00:10:55 -0800 Subject: [PATCH] 100% coverage for recovery_token --- letsencrypt/client/tests/recovery_token_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/letsencrypt/client/tests/recovery_token_test.py b/letsencrypt/client/tests/recovery_token_test.py index 2476b0c34..f37dcbc4d 100644 --- a/letsencrypt/client/tests/recovery_token_test.py +++ b/letsencrypt/client/tests/recovery_token_test.py @@ -42,6 +42,11 @@ class RecoveryTokenTest(unittest.TestCase): # Shouldn't throw an error self.rec_token.cleanup(challenge_util.RecTokenChall("example4.com")) + # SHOULD throw an error (OSError other than nonexistent file) + self.assertRaises( + OSError, self.rec_token.cleanup, + challenge_util.RecTokenChall("a"+"r"*10000+".com")) + def test_perform_stored(self): self.rec_token.store_token("example4.com", 444) response = self.rec_token.perform(