Created
February 7, 2021 11:46
-
-
Save pprzetacznik/87cd0b5e899a116bb90265dd3ed51b2b to your computer and use it in GitHub Desktop.
Testing in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/652276/is-it-possible-to-create-anonymous-objects-in-python | |
from typing import Dict | |
class MicroMock: | |
def __init__(self, **kwargs: Dict) -> None: | |
self.__dict__.update(kwargs) | |
MicroMock(text="aaa") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment