More easily create fake users

This commit is contained in:
Vgr E. Barry 2016-12-19 12:53:37 -05:00
parent 85f8f9717a
commit e7eabba791

View File

@ -527,6 +527,10 @@ class FakeUser(User):
def __hash__(self):
return hash(self.nick)
@classmethod
def from_nick(cls, nick):
return cls(None, nick, None, None, None, None)
@property
def nick(self):
return self.name