Changeset 228 for trunk/moap/test/test_commands_doap.py
- Timestamp:
- 19-05-07 12:08:43 (6 years ago)
- File:
-
- 1 edited
-
trunk/moap/test/test_commands_doap.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/moap/test/test_commands_doap.py
r193 r228 17 17 self.ical = os.path.join(os.path.dirname(__file__), 'ical', 18 18 'mach.ical') 19 self.rss = os.path.join(os.path.dirname(__file__), 'rss', 20 'mach.rss') 19 21 self.stdout = StringIO.StringIO() 20 22 self.command = doap.Doap(stdout=self.stdout) … … 23 25 ret = self.command.parse(['-f', self.doap, 'ical']) 24 26 ref = open(self.ical).read() 27 self.assertEquals(self.stdout.getvalue(), ref) 28 29 def testRss(self): 30 ret = self.command.parse(['-f', self.doap, 'rss']) 31 ref = open(self.rss).read() 25 32 self.assertEquals(self.stdout.getvalue(), ref) 26 33 … … 37 44 """ % self.doap 38 45 self.assertEquals(self.stdout.getvalue(), ref) 46 47 class TestDoapUnspecified(common.TestCase): 48 # we don't specify the doap file, let doap find it on its own 49 def setUp(self): 50 self._cwd = os.getcwd() 51 doapdir = os.path.join(os.path.dirname(__file__), 'doap') 52 os.chdir(doapdir) 53 self.stdout = StringIO.StringIO() 54 self.command = doap.Doap(stdout=self.stdout) 55 56 def testShow(self): 57 doap = os.path.join(os.path.dirname(__file__), 'doap', 58 'mach.doap') 59 ret = self.command.parse(['show']) 60 ref = u"""DOAP file: %s 61 project: Mach 62 short description: mach makes chroots 63 created: 2002-06-06 64 homepage: http://thomas.apestaart.org/projects/mach/ 65 bug database: https://apestaart.org/thomas/trac/newticket 66 download page: http://thomas.apestaart.org/projects/mach/ 67 Latest release: version 0.9.0 'Cambria' on branch 2. 68 """ % doap 69 self.assertEquals(self.stdout.getvalue(), ref) 70 71 def tearDown(self): 72 os.chdir(self._cwd)
Note: See TracChangeset
for help on using the changeset viewer.
