'Create tags from python objects rather than raw xml.'

def test_tagging_from_objects(self):

    t = Tags()
    tag_set = TagSet()
    tag_set.add_tag('akey', 'avalue')
    tag_set.add_tag('anotherkey', 'anothervalue')
    t.add_tag_set(tag_set)
    self.bucket.set_tags(t)
    response = self.bucket.get_tags()
    tags = sorted(response[0], key=(lambda tag: tag.key))
    self.assertEqual(tags[0].key, 'akey')
    self.assertEqual(tags[0].value, 'avalue')
    self.assertEqual(tags[1].key, 'anotherkey')
    self.assertEqual(tags[1].value, 'anothervalue')
