def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list)
def test_format_many_tags(self): many_tags = [' A', 'Bunch', ' oftags '] many_output = helpers.format_tags(many_tags) assert set(many_output) == set(['a', 'bunch', 'oftags'])
def test_format_sep_tags(self): sep_tags = ['These, we know', 'should be many'] sep_output = helpers.format_tags(sep_tags, sep=',') assert set(sep_output) == set(['these', 'we know', 'should be many'])
def test_format_sep_tags(self): sep_tags = ["These, we know", "should be many"] sep_output = helpers.format_tags(sep_tags, sep=",") assert set(sep_output) == set(["these", "we know", "should be many"])
def test_format_many_tags(self): many_tags = [" A", "Bunch", " oftags "] many_output = helpers.format_tags(many_tags) assert set(many_output) == set(["a", "bunch", "oftags"])