def testLocalhostExpandUser(self): urlparser = URLParser() logname = os.environ.get('LOGNAME') home = os.environ.get('HOME') self.assertEqual( urlparser.abspath('file://localhost/~%s/public' % logname), 'file://localhost%s/public' % home)
def testNonFile(self): urlparser = URLParser() self.assertEqual(urlparser.abspath('svn://jarn.com/public'), 'svn://jarn.com/public')
def testLocalhostExpandUser(self): urlparser = URLParser() logname = os.environ.get('LOGNAME') home = os.environ.get('HOME') self.assertEqual(urlparser.abspath('file://localhost/~%s/public' % logname), 'file://localhost%s/public' % home)
def testLocalhost(self): urlparser = URLParser() cwd = os.getcwd() self.assertEqual(urlparser.abspath('file://localhost%s/var/dist/public' % cwd), 'file://localhost%s/var/dist/public' % cwd)
def testRelativeFile(self): urlparser = URLParser() cwd = os.getcwd() self.assertEqual(urlparser.abspath('file:var/dist/public'), 'file://%s/var/dist/public' % cwd)
def testLocalhost(self): urlparser = URLParser() cwd = os.getcwd() self.assertEqual( urlparser.abspath('file://localhost%s/var/dist/public' % cwd), 'file://localhost%s/var/dist/public' % cwd)