Fixed #24965 -- Made LiveServerTestCase.live_server_url accessible from class

This commit is contained in:
Moritz Sichert 2015-06-10 22:57:51 +02:00 committed by Tim Graham
parent e93e0c03b2
commit 296919e7a5
4 changed files with 64 additions and 5 deletions

View file

@ -144,3 +144,15 @@ if ContextDecorator is None:
with self:
return func(*args, **kwargs)
return inner
class classproperty(object):
def __init__(self, method=None):
self.fget = method
def __get__(self, instance, owner):
return self.fget(owner)
def getter(self, method):
self.fget = method
return self