summaryrefslogtreecommitdiffstats
path: root/tests/test-001-contact_reference.py
blob: 81ce3b5524942a6b1d87054609c1661c1a551a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()