def test_skin_not_activated(self): request = TestRequest( application=self.root, url='http://localhost') plugin = request.query_plugin(request.application, IVirtualHosting) root, method, path = plugin(request.method, request.path) self.assertEqual(root, request.application) self.assertEqual(method, 'index_html') self.assertEqual(path, []) self.assertFalse(IMultiflexSkin.providedBy(request))
def test_skin_folder_not_enforced(self): request = TestRequest( application=self.root, url='http://localhost/user/information', headers=[('X-VHM-Url', 'http://localhost')]) plugin = request.query_plugin(request.application, IVirtualHosting) root, method, path = plugin(request.method, request.path) self.assertEqual(root, self.root.docs.user) self.assertEqual(method, 'index_html') self.assertEqual(path, ['information']) self.assertTrue(IMultiflexSkin.providedBy(request)) self.assertFalse(IStandardIssueSkin.providedBy(request)) self.assertTrue(request.get(SET_SKIN_ALLOWED_FLAG, True))