def test_get_for_path_script_name(self): """ The dispatcher should support a different WSGIScriptAlias prefix. """ with script_name('/_test_subdir_/'): sibling1 = Page.objects.get_for_path('/sibling1/') self.assertEquals(sibling1.get_absolute_url(), '/_test_subdir_/sibling1/', "UrlNode.get_absolute_url() should take changes to SCRIPT_NAME into account (got: {0}).".format(sibling1.get_absolute_url())) # Note the test client always operates relative to the Django script_name root. self.assert200('/') self.assert200('/sibling1/')
def test_get_for_path_script_name(self): """ The dispatcher should support a different WSGIScriptAlias prefix. """ with script_name('/_test_subdir_/'): sibling1 = Page.objects.get_for_path('/sibling1/') self.assertEqual(sibling1.get_absolute_url(), '/_test_subdir_/sibling1/', "UrlNode.get_absolute_url() should take changes to SCRIPT_NAME into account (got: {0}).".format(sibling1.get_absolute_url())) # Note the test client always operates relative to the Django script_name root. self.assert200('/') self.assert200('/sibling1/')