def set_microsite(domain):
 def decorator(func):
  '\n        Decorator to set current microsite according to domain\n        '
  @wraps(func)
  def inner(request, *args, **kwargs):
   '\n            Execute the function after setting up the microsite.\n            '
   microsite.set_by_domain(domain)
   return func(request, *args, **kwargs)
  return inner
 return decorator

def set_microsite ( domain ) : def decorator ( func ) : @ wraps ( func ) def inner ( request , * args , ** kwargs ) : microsite . set_by_domain ( domain ) return func ( request , * args , ** kwargs ) return inner return decorator
returns a decorator that can be used on a test_case to set a specific microsite for the current test case .