1
0
Fork 0
mirror of https://github.com/correl/openapi-core.git synced 2025-04-06 01:04:12 -09:00
openapi-core/openapi_core/testing/factories.py
2020-01-17 14:52:26 +00:00

11 lines
261 B
Python

class FactoryClassMock(object):
_instances = {}
def __new__(cls, obj):
if obj not in cls._instances:
cls._instances[obj] = object.__new__(cls)
return cls._instances[obj]
def __init__(self, obj):
self.obj = obj