summaryrefslogtreecommitdiffstats
path: root/tests/test-001-contact_reference.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-001-contact_reference.py')
-rw-r--r--tests/test-001-contact_reference.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test-001-contact_reference.py b/tests/test-001-contact_reference.py
new file mode 100644
index 0000000..81ce3b5
--- /dev/null
+++ b/tests/test-001-contact_reference.py
@@ -0,0 +1,21 @@
+import datetime
+import unittest
+
+from pykolab.xml import ContactReference
+
+class TestEventXML(unittest.TestCase):
+ contact_reference = ContactReference("jane@doe.org")
+
+ def test_001_minimal(self):
+ self.assertIsInstance(self.contact_reference.__str__(), basestring)
+
+ def test_002_empty_name(self):
+ self.assertEqual(self.contact_reference.get_name(), "")
+
+ def test_003_set_name(self):
+ name = "Doe, Jane"
+ self.contact_reference.set_name(name)
+ self.assertEqual(self.contact_reference.get_name(), name)
+
+if __name__ == '__main__':
+ unittest.main()