def naming_scheme(name, description, parameters, idx):
source = str(parameters["source"])
destination = str(parameters["destination"])
expect_success = str(parameters["expect_success"])
return "%s_%s_%s" % (name, source, destination), \
"Check the functionality works with " \
"source {} and destination {} with success={}".format(source, destination, expect_success)
@lcc.suite(description="My tests", rank=1)
class MyTests:
PROJECT_DIR = os.path.join(os.path.dirname(__file__), 'resources')
@lcc.test("verify xyz functionality")
@lcc.parametrized(json.load(open(os.path.join(PROJECT_DIR, "test_data.json"))), naming_scheme)
def verify_xyz(self, source, destination, expect_success):
source_location = Location(source[0], source[1])
destination_location = Location(destination[0], destination[1])