Skip to content

Commit

Permalink
Coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Dec 28, 2009
1 parent 12ee7a9 commit 8831b89
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions repoze/vhm/tests/test_utils.py
Expand Up @@ -143,3 +143,18 @@ def test_with_virtual_root(self):
environ = {'repoze.vhm.virtual_root':'/abc'}
f = self._getFUT()
self.assertEqual(f(environ), '/abc')

class Test_getVirtualURL(unittest.TestCase):
def _getFUT(self):
from repoze.vhm.utils import getVirtualURL
return getVirtualURL

def test_without_virtual_root(self):
environ = {}
f = self._getFUT()
self.assertEqual(f(environ), None)

def test_with_virtual_root(self):
environ = {'repoze.vhm.virtual_url':'/a/b/c'}
f = self._getFUT()
self.assertEqual(f(environ), '/a/b/c')

0 comments on commit 8831b89

Please sign in to comment.