Skip to content

Commit

Permalink
Convert the test to trial.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin committed Mar 3, 2009
1 parent 621fea4 commit 1fb7a4f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/test.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import with_statement

import sys
import unittest
from twisted.trial import unittest

sys.path.extend(['lib', '../lib'])
import longurl
Expand All @@ -15,17 +15,15 @@ def __parse(self, fn, parser):
return parser(f.read())

def testServiceList(self):
s = self.__parse("test/services.xml", longurl.Services)
s = self.__parse("../test/services.xml", longurl.Services)
self.assertEquals(109, len(s))
self.assertEquals('snipurl.com', s['snipurl.com'].name)
urls = set(['snipurl.com', 'snurl.com', 'snipr.com', 'sn.im'])
self.assertEquals(urls, set(s['snipurl.com'].domains))

def testExpandedURL(self):
s = self.__parse("test/expand.xml", longurl.ExpandedURL)
s = self.__parse("../test/expand.xml", longurl.ExpandedURL)
self.assertEquals('Invalid Item', s.title)
self.assertEquals('http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=1698262135',
s.url)

if __name__ == '__main__':
unittest.main()

0 comments on commit 1fb7a4f

Please sign in to comment.