Esempio n. 1
0
 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)
Esempio n. 2
0
 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'])
Esempio n. 3
0
 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'])
Esempio n. 4
0
 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)
Esempio n. 5
0
 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'])
Esempio n. 6
0
 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'])
Esempio n. 7
0
 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"])
Esempio n. 8
0
 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"])