From f4d5ce1986a3fb02e06a44defd117a455c0a3b06 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Fri, 10 Jul 2015 05:27:01 +0000 Subject: [PATCH] Include Account.id in the Account.slug. --- letsencrypt/account.py | 4 ++-- letsencrypt/tests/account_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/letsencrypt/account.py b/letsencrypt/account.py index b2b00a32e..1af9013d3 100644 --- a/letsencrypt/account.py +++ b/letsencrypt/account.py @@ -68,8 +68,8 @@ class Account(object): # pylint: disable=too-few-public-methods @property def slug(self): """Short account identification string, useful for UI.""" - return "{1}@{0}".format(pyrfc3339.generate( - self.meta.creation_dt), self.meta.creation_host) + return "{1}@{0} ({2})".format(pyrfc3339.generate( + self.meta.creation_dt), self.meta.creation_host, self.id[:4]) def __repr__(self): return "<{0}({1})>".format(self.__class__.__name__, self.id) diff --git a/letsencrypt/tests/account_test.py b/letsencrypt/tests/account_test.py index f325bc7ba..c3cfcf6c7 100644 --- a/letsencrypt/tests/account_test.py +++ b/letsencrypt/tests/account_test.py @@ -49,7 +49,7 @@ class AccountTest(unittest.TestCase): def test_slug(self): self.assertEqual( - self.acc.slug, "test.letsencrypt.org@2015-07-04T14:04:10Z") + self.acc.slug, "test.letsencrypt.org@2015-07-04T14:04:10Z (2ba3)") def test_repr(self): self.assertEqual(