I have the following decorator in a base class:
class BaseTests(TestCase):
@staticmethod
def check_time(self, fn):
@wraps(fn)
def tes
Simply put
check_time = BaseTests.check_time
in your second module:
from module_paths.base_posting import BaseTests
check_time = BaseTests.check_time
class SpecificTest(BaseTests):
@check_time # use the decorator
def test_post(self):
# do testing ...
You may also want to reconsider making check_time
a staticmethod, since it appears your use case employs it more as a stand-alone function than as a staticmethod.