mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 18:04:31 +02:00
Include Account.id in the Account.slug.
This commit is contained in:
@@ -68,8 +68,8 @@ class Account(object): # pylint: disable=too-few-public-methods
|
|||||||
@property
|
@property
|
||||||
def slug(self):
|
def slug(self):
|
||||||
"""Short account identification string, useful for UI."""
|
"""Short account identification string, useful for UI."""
|
||||||
return "{1}@{0}".format(pyrfc3339.generate(
|
return "{1}@{0} ({2})".format(pyrfc3339.generate(
|
||||||
self.meta.creation_dt), self.meta.creation_host)
|
self.meta.creation_dt), self.meta.creation_host, self.id[:4])
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<{0}({1})>".format(self.__class__.__name__, self.id)
|
return "<{0}({1})>".format(self.__class__.__name__, self.id)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class AccountTest(unittest.TestCase):
|
|||||||
|
|
||||||
def test_slug(self):
|
def test_slug(self):
|
||||||
self.assertEqual(
|
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):
|
def test_repr(self):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
|||||||
Reference in New Issue
Block a user