summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-12-28 12:38:33 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-12-28 12:38:33 +0100
commit7c4b36524e4ce2a3a035624de0e67cdbf566c0a8 (patch)
tree984952ac8bbc6ee296bd8df449225a2e949d5eae
parent737ee6fa3362e9a403c62d4724159d323a1fef5d (diff)
downloadpykolab-7c4b36524e4ce2a3a035624de0e67cdbf566c0a8.tar.gz
Fix note unit tests
-rw-r--r--pykolab/xml/note.py2
-rw-r--r--tests/unit/test-018-note.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/pykolab/xml/note.py b/pykolab/xml/note.py
index fa1c89b..0fc7c24 100644
--- a/pykolab/xml/note.py
+++ b/pykolab/xml/note.py
@@ -1,6 +1,8 @@
import pytz
import datetime
import kolabformat
+
+from pykolab.translate import _
from pykolab.xml import utils as xmlutils
from pykolab.xml.utils import ustr
diff --git a/tests/unit/test-018-note.py b/tests/unit/test-018-note.py
index c4ba764..dca077f 100644
--- a/tests/unit/test-018-note.py
+++ b/tests/unit/test-018-note.py
@@ -68,9 +68,10 @@ class TestNoteXML(unittest.TestCase):
def test_011_to_xml(self):
note = Note()
- note.setClassification(-1)
- self.assertRaises(NoteIntegrityError, note.__str__)
+ with self.assertRaises(ValueError):
+ note.set_classification(-1)
+ def test_012_to_xml(self):
# minimal
note = Note()
xml = str(note)
@@ -92,4 +93,4 @@ class TestNoteXML(unittest.TestCase):
if __name__ == '__main__':
- unittest.main() \ No newline at end of file
+ unittest.main()