다른 다중 행 단계 정의에서 다중 행 정의를 호출하려고 시도합니다. lettuce.py 웹 사이트는 say에 거의 없습니다.다른 다중 행 단계 정의를 호출하는 다중 행 정의를 갖는 방법
@step(u'I create a "([^"]*)" with the definition:$')
def i_create_a_resource_with_the_definition(step, resource):
body = ""
if step.multiline != "":
definition = json.loads(step.multiline)
body = json.dumps(definition)
url = world.url + "/" + resource + "s"
world.response = world.perform_http_request(url = url, method = "POST", body = body)
@step(u'I create a duplicate "([^"]*)" with the definition:$')
def i_create_a_duplicate_resource_with_the_definition(step, resource):
step.behave_as("""
I create a "{resource}" with the definition:
""".format(resource = resource))