usawa

Signed, immutable accounting.
Log | Files | Refs | Submodules | LICENSE

tag.py (405B)


      1 import unittest
      2 import logging
      3 
      4 from usawa.tag import Tags
      5 
      6 logging.basicConfig(level=logging.DEBUG)
      7 
      8 
      9 class TestTag(unittest.TestCase):
     10 
     11     def test_tags_serialize(self):
     12         o = Tags()
     13         o.add('foo')
     14         o.add('bar', description='baz')
     15         v = o.serialize()
     16         o = Tags.deserialize(v)
     17         self.assertEqual('foo, bar', str(o))
     18 
     19 
     20 if __name__ == '__main__':
     21     unittest.main()