def tearDownClass(cls): super().tearDownClass() constants.set_mainnet()
def wrapper(self, *args, **kwargs): constants.set_testnet() try: return func(self, *args, **kwargs) finally: constants.set_mainnet()