More easily create fake users
This commit is contained in:
parent
85f8f9717a
commit
e7eabba791
@ -527,6 +527,10 @@ class FakeUser(User):
|
|||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash(self.nick)
|
return hash(self.nick)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_nick(cls, nick):
|
||||||
|
return cls(None, nick, None, None, None, None)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nick(self):
|
def nick(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user