A number of calzope views fail to render when CalZope? is used witout CPSSharedCalendar. Mostly due to checkPermissionOnEvent (CPSSharedCalendar/calendartool.py) which was not back-ported to CalZope?.
I have written a patch adding some functional tests to CalZope? which highlight this (I hope it is reasonable). The tests are pretty basic, and just try to make sure the views render correctly in a pure CalZope? setup.
I run the tests from a Zope 2.8 instance using './bin/test.py -f --libdir Products' with CalZope? installed in Products. Adding a 'print response.getBody()' before the failure can get you some decent debugging info.
Patch:
Index: ftests/test_views.py
===================================================================
--- ftests/test_views.py (revision 0)
+++ ftests/test_views.py (revision 0)
@@ -0,0 +1,143 @@
+# -*- coding: ISO-8859-15 -*-
+# (C) Copyright 2005 Brian Sutherland <jinty@web.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+"""
+Functional tests for CalZope Views.
+"""
+
+import unittest
+from StringIO import StringIO
+from urllib import urlencode
+from datetime import timedelta, datetime
+
+from Testing import ZopeTestCase
+from Testing.ZopeTestCase import user_name
+from Testing.ZopeTestCase import user_password
+
+# Product Dependencies
+ZopeTestCase.installProduct('CalCore')
+ZopeTestCase.installProduct('CalZope')
+ZopeTestCase.installProduct('Five')
+
+
+class TestViews(ZopeTestCase.FunctionalTestCase):
+ """A minimal functional test for the views of a calendar."""
+
+ def afterSetUp(self):
+ self.folder_path = '/'+self.folder.absolute_url(1)
+ self.basic_auth = '%s:%s' % (user_name, user_password)
+ # Add a calendar tool, calendar
+ self.folder.manage_addProduct['CalZope'].manage_addCalendarTool()
+ self.folder.manage_addProduct['CalZope'].manage_addCalendar('calendar',+ 'Calendar')
+ # Add the test user as an attendee
+ portal_calendar = self.folder.portal_calendar
+ attendee = portal_calendar.attendee_source.getAttendee(user_name)
+ self.folder.calendar.addAttendee(attendee)
+ # Make a test event with a known id
+ portal_calendar.storage_manager.createEvent(unique_id='event1',
+ title="BigBash",
+ dtstart=datetime(2005, 1, 17, 15, 8),
+ duration=timedelta(hours=2, minutes=20),
+ organizer=attendee)
+ # Short circuit of access control
+ self.folder.acl_users.userFolderEditUser(user_name, user_password,
+ ['Manager'], [])
+
+ def testCalendar(self):
+ response = self.publish(self.folder_path +
+ '/calendar', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ response = self.publish(self.folder_path +
+ '/calendar/calendar.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testCalendarEdit(self):
+ response = self.publish(self.folder_path +
+ '/calendar/edit.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testCalendarActionNeededEvents(self):
+ response = self.publish(self.folder_path +
+ '/calendar/action_needed_events.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testMeetingHelper(self):
+ response = self.publish(self.folder_path +
+ '/calendar/meetinghelper.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ self.assert_("Meeting helper" in response.getBody())
+
+ def testICalExport(self):
+ response = self.publish(self.folder_path +
+ '/calendar/cpscalendar.ics', self.basic_auth)
+ # XXX - Should CPS really be in urls?
+ self.assertEqual(response.getStatus(), 200)
+
+ def testICalImport(self):
+ response = self.publish(self.folder_path +
+ '/calendar/import.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testYear(self):
+ response = self.publish(self.folder_path +
+ '/calendar/2005', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testMonth(self):
+ response = self.publish(self.folder_path +
+ '/calendar/2005/05', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testDay(self):
+ response = self.publish(self.folder_path +
+ '/calendar/2005/01/17', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ self.assert_("BigBash" in response.getBody())
+
+ def testWeek(self):
+ response = self.publish(self.folder_path +
+ '/calendar/week/2005/3', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testWeekDay(self):
+ response = self.publish(self.folder_path +
+ '/calendar/week/2005/3/2', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+
+ def testWeekList(self):
+ response = self.publish(self.folder_path +
+ '/calendar/week', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ self.assert_("Weeks" in response.getBody())
+
+ def testEventList(self):
+ response = self.publish(self.folder_path +
+ '/calendar/event/eventlist.html', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ self.assert_("Events" in response.getBody())
+
+ def testEvent(self):
+ response = self.publish(self.folder_path +
+ '/calendar/event/event1', self.basic_auth)
+ self.assertEqual(response.getStatus(), 200)
+ self.assert_("BigBash" in response.getBody())
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestViews))
+ return suite
Index: ftests/__init__.py
===================================================================
--- ftests/__init__.py (revision 0)
+++ ftests/__init__.py (revision 0)
@@ -0,0 +1 @@
+"""Functional tests for CalZope."""