Add tests for DataMixin

This commit is contained in:
jrootjunior 2019-11-15 14:09:37 +02:00
parent 013ee3d496
commit a6573656d0
5 changed files with 39 additions and 17 deletions

View file

@ -1,13 +1,6 @@
from .api import methods, session, types
from .api.client.bot import Bot
try:
import uvloop
uvloop.install()
except ImportError:
uvloop = None
__all__ = ["__api_version__", "__version__", "types", "methods", "Bot", "session"]
__version__ = "3.0dev.1"

View file

@ -22,6 +22,9 @@ class DataMixin:
def __delitem__(self, key):
del self.data[key]
def __contains__(self, item):
return item in self.data
def get(self, key, default=None):
return self.data.get(key, default)