mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-01 03:00:09 +00:00
12 lines
261 B
Python
12 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
|