def test_append_when_adds_right_class_to_whens_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_when("some action", lambda: None, args, kwargs)
    assert isinstance(scenario.whens[0], Action), "There should be one when of type Action in the scenario but there was %s" % scenario.whens[0].__class__
def test_append_when_adds_to_whens_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_when("some action", lambda: None, args, kwargs)
    assert len(scenario.whens) == 1, "There should be one when in the scenario but there was %d" % len(scenario.whens)
Пример #3
0
def test_append_when_adds_right_class_to_whens_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_when("some action", lambda: None, args, kwargs)
    assert isinstance(
        scenario.whens[0], Action
    ), "There should be one when of type Action in the scenario but there was %s" % scenario.whens[
        0].__class__
Пример #4
0
def test_append_when_adds_to_whens_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_when("some action", lambda: None, args, kwargs)
    assert len(
        scenario.whens
    ) == 1, "There should be one when in the scenario but there was %d" % len(
        scenario.whens)