tests/test-001-contact_reference.py tests/test-002-attendee.py tests/test-003-event.py
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Fri Jul 13 15:57:46 CEST 2012
tests/test-001-contact_reference.py | 9 +++++++++
tests/test-002-attendee.py | 9 +++++++++
tests/test-003-event.py | 9 +++++++++
3 files changed, 27 insertions(+)
New commits:
commit 53b5d85dda5f956892a0074863d965d4c14a96fe
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Fri Jul 13 14:56:45 2012 +0100
Attempt to fix running tests on target platforms
diff --git a/tests/test-001-contact_reference.py b/tests/test-001-contact_reference.py
index 81ce3b5..c80d139 100644
--- a/tests/test-001-contact_reference.py
+++ b/tests/test-001-contact_reference.py
@@ -6,6 +6,15 @@ from pykolab.xml import ContactReference
class TestEventXML(unittest.TestCase):
contact_reference = ContactReference("jane at doe.org")
+ def assertIsInstance(self, _value, _type):
+ if hasattr(unittest.TestCase, 'assertIsInstance'):
+ return unittest.TestCase.assertIsInstance(self, _value, _type)
+ else:
+ if (type(_value)) == _type:
+ return True
+ else:
+ raise AssertionError, "%s != %s" % (type(_value), _type)
+
def test_001_minimal(self):
self.assertIsInstance(self.contact_reference.__str__(), basestring)
diff --git a/tests/test-002-attendee.py b/tests/test-002-attendee.py
index 15ce83f..465349a 100644
--- a/tests/test-002-attendee.py
+++ b/tests/test-002-attendee.py
@@ -6,6 +6,15 @@ from pykolab.xml import Attendee
class TestEventXML(unittest.TestCase):
attendee = Attendee("jane at doe.org")
+ def assertIsInstance(self, _value, _type):
+ if hasattr(unittest.TestCase, 'assertIsInstance'):
+ return unittest.TestCase.assertIsInstance(self, _value, _type)
+ else:
+ if (type(_value)) == _type:
+ return True
+ else:
+ raise AssertionError, "%s != %s" % (type(_value), _type)
+
def test_001_minimal(self):
self.assertIsInstance(self.attendee.__str__(), basestring)
diff --git a/tests/test-003-event.py b/tests/test-003-event.py
index c18523a..9da4cf6 100644
--- a/tests/test-003-event.py
+++ b/tests/test-003-event.py
@@ -12,6 +12,15 @@ from pykolab.xml import InvalidEventDateError
class TestEventXML(unittest.TestCase):
event = Event()
+ def assertIsInstance(self, _value, _type):
+ if hasattr(unittest.TestCase, 'assertIsInstance'):
+ return unittest.TestCase.assertIsInstance(self, _value, _type)
+ else:
+ if (type(_value)) == _type:
+ return True
+ else:
+ raise AssertionError, "%s != %s" % (type(_value), _type)
+
def test_000_no_start_date(self):
self.assertRaises(EventIntegrityError, self.event.__str__)
More information about the commits
mailing list