summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-13 14:56:45 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-13 14:56:45 +0100
commit53b5d85dda5f956892a0074863d965d4c14a96fe (patch)
tree525734568cdac3a1ca1f864020d579b2090dd2ac /tests
parentb7fda1267f8b9d85601b7a283b59ff54c8b671d4 (diff)
downloadpykolab-53b5d85dda5f956892a0074863d965d4c14a96fe.tar.gz
Attempt to fix running tests on target platforms
Diffstat (limited to 'tests')
-rw-r--r--tests/test-001-contact_reference.py9
-rw-r--r--tests/test-002-attendee.py9
-rw-r--r--tests/test-003-event.py9
3 files changed, 27 insertions, 0 deletions
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@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@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__)