def test_append_then_adds_right_class_to_thens_in_scenario():
    story = Story(as_a="Someone", i_want_to="do something", so_that="something", identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args":"something"}
    scenario.add_then("some action", lambda: None, args, kwargs)
    assert isinstance(scenario.thens[0], Action), "There should be one then of type Action in the scenario but there was %s" % scenario.thens[0].__class__
def test_append_then_adds_to_thens_in_scenario():
    story = Story(as_a="Someone", i_want_to="do something", so_that="something", identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args":"something"}
    scenario.add_then("some action", lambda: None, args, kwargs)
    assert len(scenario.thens) == 1, "There should be one then in the scenario but there was %d" % len(scenario.thens)
Esempio n. 3
0
def test_append_then_adds_right_class_to_thens_in_scenario():
    story = Story(as_a="Someone",
                  i_want_to="do something",
                  so_that="something",
                  identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args": "something"}
    scenario.add_then("some action", lambda: None, args, kwargs)
    assert isinstance(
        scenario.thens[0], Action
    ), "There should be one then of type Action in the scenario but there was %s" % scenario.thens[
        0].__class__
Esempio n. 4
0
def test_append_then_adds_to_thens_in_scenario():
    story = Story(as_a="Someone",
                  i_want_to="do something",
                  so_that="something",
                  identity="Some File")
    scenario = Scenario(index="1", title="Something", story=story)
    args = ["a"]
    kwargs = {"extra_args": "something"}
    scenario.add_then("some action", lambda: None, args, kwargs)
    assert len(
        scenario.thens
    ) == 1, "There should be one then in the scenario but there was %d" % len(
        scenario.thens)