~mmcg069/software-center/mkit-theme-tweaks

« back to all changes in this revision

Viewing changes to test/test_utils.py

  • Committer: Matthew McGowan
  • Date: 2010-08-23 20:51:21 UTC
  • mfrom: (1011.1.22 trunk)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20100823205121-lgcpd87tn17gbgj4
merge w trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import sys
 
4
import unittest
 
5
sys.path.insert(0,"../")
 
6
 
 
7
from softwarecenter.utils import *
 
8
 
 
9
class TestSCUtils(unittest.TestCase):
 
10
    """ tests the sc utils """
 
11
 
 
12
    def test_encode(self):
 
13
        xml = "What’s New"
 
14
        python = u"What\u2019s New"
 
15
        self.assertEqual(decode_xml_char_reference(xml), python)
 
16
        # fails currently 
 
17
        #self.assertEqual(encode_for_xml(python), xml)
 
18
 
 
19
if __name__ == "__main__":
 
20
    import logging
 
21
    logging.basicConfig(level=logging.DEBUG)
 
22
    unittest.main()