Ignore:
Timestamp:
19-05-07 12:52:04 (6 years ago)
Author:
thomas
Message:
  • moap/command/doap.py (Rss.do): break into two lines
  • moap/doap/rss.py (doapsToRss, createdToPubDate, cheetah_toRss): Make the two template language's output as similar as possible.
  • moap/test/Makefile.am:
  • moap/test/rss/mach.rss.cheetah:
  • moap/test/rss/mach.rss.genshi: Add two rss feeds based on the two templating languages.
  • moap/test/test_commands_doap.py (TestDoapMach?.setUp, TestDoapMach?.testRssGenshi, TestDoapMach?.testRssCheetah): Add tests for the specific template languages. Coverage: 72 % ( 844 / 1157)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/moap/test/test_commands_doap.py

    r228 r230  
    1717        self.ical = os.path.join(os.path.dirname(__file__), 'ical', 
    1818            'mach.ical') 
    19         self.rss = os.path.join(os.path.dirname(__file__), 'rss', 
    20             'mach.rss') 
     19        self.grss = os.path.join(os.path.dirname(__file__), 'rss', 
     20            'mach.rss.genshi') 
     21        self.crss = os.path.join(os.path.dirname(__file__), 'rss', 
     22            'mach.rss.cheetah') 
    2123        self.stdout = StringIO.StringIO() 
    2224        self.command = doap.Doap(stdout=self.stdout) 
     
    2729        self.assertEquals(self.stdout.getvalue(), ref) 
    2830 
    29     def testRss(self): 
     31    def testRssGenshi(self): 
    3032        ret = self.command.parse(['-f', self.doap, 'rss']) 
    31         ref = open(self.rss).read() 
     33        ref = open(self.grss).read() 
     34        self.assertEquals(self.stdout.getvalue(), ref) 
     35 
     36    def testRssCheetah(self): 
     37        ret = self.command.parse(['-f', self.doap, 'rss', '-t', 'cheetah']) 
     38        ref = open(self.crss).read() 
    3239        self.assertEquals(self.stdout.getvalue(), ref) 
    3340 
Note: See TracChangeset for help on using the changeset viewer.