Esempio n. 1
0
 def _inner(*args, **kwargs):  # pylint: disable=C0111
     # Create a scenario, just one tag for our mocked class.
     scenarios.add_xml_scenario(scenario_name, "Temporary scenario",
                                "<%s/>" % temp_class.__name__)
     try:
         return func(*args, **kwargs)
     finally:
         scenarios.remove_scenario(scenario_name)
Esempio n. 2
0
 def _inner(*args, **kwargs):  # pylint: disable=C0111
     # Create a scenario, just one tag for our mocked class.
     scenarios.add_xml_scenario(
         scenario_name, "Temporary scenario {}".format(temp_class.__name__), "<%s/>" % temp_class.__name__
     )
     try:
         return func(*args, **kwargs)
     finally:
         scenarios.remove_scenario(scenario_name)
Esempio n. 3
0
 def _inner(*args, **kwargs):
     # Create a scenario, just one tag for our mocked class.
     scenarios.add_xml_scenario(
         scenario_name, u"Temporary scenario {}".format(temp_class.__name__),
         "<%s/>" % temp_class.__name__
     )
     try:
         return func(*args, **kwargs)
     finally:
         scenarios.remove_scenario(scenario_name)