Пример #1
0
 def test_calendar_add_owner_new(self):
     '''this function tests the calendar_add_owner method for a valid user not already
     owner of the calendar'''
     self.client.create(self.cal_name)
     calendar_already_exists, success, acl = \
         calendar_validate(self.cal_name, self.client)
     calendar_already_owner_start = calendar_already_owner('magarvey', acl, self.client)
     try:
         calendar_add_owner('magarvey', self.cal_name, self.client)
         calendar_add_owner_success = True
     except Exception, err:
         print err
         calendar_add_owner_success = False
Пример #2
0
 def test_calendar_add_owner_invalid(self):
     '''this function tests the calendar_add_owner method on a user that is not in the
     gtest.pdx.edu system'''
     calendar_already_exists, success, acl = \
         calendar_validate('abc_calendar', self.client)
     calendar_already_owner_start = calendar_already_owner('?//%/$/#@', acl, self.client)
     try:
         calendar_add_owner('?//%/$/#@', 'abc_calendar', self.client)
         calendar_add_owner_success = True
     except:
         calendar_add_owner_success = False
     assert calendar_already_exists
     assert (calendar_already_owner_start == False)
     assert (success == False)
     assert (calendar_add_owner_success == False)
Пример #3
0
 def test_calendar_add_owner_existing(self):
     '''this function tests the calendar_add_owner method on a calendar that the user
     is already owner of'''
     calendar_already_exists, success, acl = \
         calendar_validate('abc_calendar', self.client)
     calendar_already_owner_start = calendar_already_owner('magarvey', acl, self.client)
     try:
         calendar_add_owner('magarvey', 'abc_calendar', self.client)
         calendar_add_owner_success = True
     except:
         calendar_add_owner_success = False
     assert calendar_already_exists
     assert calendar_already_owner_start
     assert (success == False)
     assert (calendar_add_owner_success == False)