def test_fixture_patch(self): fixture = Fixture('Teardown') assert_equal(fixture.as_list(), ['Teardown']) fixture.name = 'Keyword' assert_equal(fixture.as_list(), ['Teardown', 'Keyword']) fixture.args = ['arg1', 'arg2'] assert_equal(fixture.as_list(), ['Teardown', 'Keyword', 'arg1', 'arg2']) fixture.name = '' assert_equal(fixture.as_list(), ['Teardown', '', 'arg1', 'arg2'])
def test_fixture_patch(self): fixture = Fixture("Teardown") assert_equals(fixture.as_list(), ["Teardown"]) fixture.name = "Keyword" assert_equals(fixture.as_list(), ["Teardown", "Keyword"]) fixture.args = ["arg1", "arg2"] assert_equals(fixture.as_list(), ["Teardown", "Keyword", "arg1", "arg2"]) fixture.name = "" assert_equals(fixture.as_list(), ["Teardown", "", "arg1", "arg2"])
def setUp(self): self.fix = Fixture('Suite Setup') self.fix.name = 'My Setup' self.fix.args = ['argh', 'urgh'] self.parent = _FakeParent() self.ctrl = FixtureController(self.parent, self.fix)
def test_contains_keyword_with_regexp_with_empty_fixture(self): empty_fixture_controller = FixtureController(self.parent, Fixture('Setup')) keyword_regexp = re.compile(r'foo.*bar') assert_false(empty_fixture_controller.contains_keyword(keyword_regexp))
def test_value_with_empty_fixture(self): assert_equals(FixtureController(self.parent, Fixture('Teardown')).display_value, '')