class TestTag:
    def setUp(self):
        self._tag = Tag('<a href="http://google.com" class="varning test">')

    def test_name(self):
        assert self._tag.name() == 'a'

    def test_list(self):
        assert self._tag.attributes() == ['href', 'class']

    def test_value(self):
        assert self._tag.get_value('href') == 'http://google.com'
        assert self._tag.get_value('class') == 'varning test'
        assert self._tag.get_value('id') == ''

    def test_generation(self):
        assert self._tag.generate() == '<a href="http://google.com" class="varning test">'

    def test_delete(self):
        self._tag.set_value('class', '')
        assert self._tag.generate() == '<a href="http://google.com">'
 def setUp(self):
     self._tag = Tag('<a href="http://google.com" class="varning test">')