'test that posixs filenames are handled appropriately by Template.'

def test_posix_paths(self):

    current_path = os.path
    import posixpath
    os.path = posixpath
    try:
        class NoCompileTemplate(Template, ):
            def _compile_from_file(self, path, filename):
                self.path = path
                return Template('foo    bar').module
        t1 = NoCompileTemplate(filename='/var/www/htdocs/includes/template.html', module_directory='/var/lib/modules')
        eq_(t1.uri, '/var/www/htdocs/includes/template.html')
        eq_(t1.path, '/var/lib/modules/var/www/htdocs/includes/template.html.py')
        t1 = NoCompileTemplate(filename='/var/www/htdocs/includes/template.html', uri='/bar/template.html', module_directory='/var/lib/modules')
        eq_(t1.uri, '/bar/template.html')
        eq_(t1.path, '/var/lib/modules/bar/template.html.py')
    finally:
        os.path = current_path
