mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Feature/eq method for default (#1789)
* Add changelog for #1707 * Add __eq__ and __hash__ methods to the Default class * Add tests for the eq and hash methods to the TestDefault
This commit is contained in:
parent
9f49c0413f
commit
875f37f780
3 changed files with 18 additions and 0 deletions
|
|
@ -24,6 +24,15 @@ class TestDefault:
|
|||
default = Default("test")
|
||||
assert repr(default) == "<Default('test')>"
|
||||
|
||||
def test_eq_same_name(self):
|
||||
assert Default("test") == Default("test")
|
||||
|
||||
def test_eq_different_name(self):
|
||||
assert Default("foo") != Default("bar")
|
||||
|
||||
def test_hash(self):
|
||||
assert hash(Default("test")) == hash(Default("test"))
|
||||
|
||||
|
||||
class TestDefaultBotProperties:
|
||||
def test_post_init_empty(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue