def test_tags(): """Test that format update parses tags correctly""" # Test valid tags. for tag in ("#t", "#tag", "#TAG", "#tag123"): expected = '%s <div class="tags">%s</div>' % (tag, TAG_TMPL.format("", tag[1:].lower(), tag[1:])) eq_(format_update(tag), expected) # Test invalid tags. for tag in ("#1", "#.abc", "#?abc"): eq_(format_update(tag), tag)
def test_tags(self): # Test valid tags. for tag in ('#t', '#tag', '#TAG', '#tag123'): expected = '%s <div class="tags">%s</div>' % (tag, TAG_TMPL.format('', tag[1:].lower(), tag[1:]),) eq_(format_update(tag), expected) # Test invalid tags. for tag in ('#1', '#.abc', '#?abc'): eq_(format_update(tag), tag)
def test_tags(): """Test that format update parses tags correctly""" # Test valid tags. for tag in ('#t', '#tag', '#TAG', '#tag123'): expected = '%s <div class="tags">%s</div>' % ( tag, TAG_TMPL.format('', tag[1:].lower(), tag[1:])) eq_(format_update(tag), expected) # Test invalid tags. for tag in ('#1', '#.abc', '#?abc'): eq_(format_update(tag), tag)
def test_tags(self): """Test that format update parses tags correctly""" with self.app.app_context(): # Test valid tags. for tag in ('#t', '#tag', '#TAG', '#tag123'): expected = '%s <div class="tags">%s</div>' % ( tag, TAG_TMPL.format('', tag[1:].lower(), tag[1:])) eq_(format_update(tag), expected) # Test invalid tags. for tag in ('#1', '#.abc', '#?abc'): eq_(format_update(tag), tag)