summaryrefslogtreecommitdiff
path: root/tests/core
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/logs.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/core/logs.py b/tests/core/logs.py
index 69a4775..656d212 100644
--- a/tests/core/logs.py
+++ b/tests/core/logs.py
@@ -1,9 +1,3 @@
-#!/usr/bin/python3-dbg
-# -*- coding: utf-8 -*-
-
-
-# Tests validant le bon calcul d'empreintes.
-
from chrysacase import ChrysalideTestCase
from pychrysalide import core
@@ -15,13 +9,13 @@ class TestCoreLogs(ChrysalideTestCase):
def testDefaultLevel(self):
"""Ensure all messages are hidden by default."""
- self.assertEqual(core.get_verbosity(), core.LMT_COUNT)
+ self.assertEqual(core.get_verbosity(), core.LogMessageType.COUNT)
def testWrongLevel(self):
"""Verify the type of level when defining new verbosity."""
- with self.assertRaisesRegex(Exception, 'argument 1 must be int, not str'):
+ with self.assertRaisesRegex(Exception, 'unable to convert the provided argument to LogMessageType'):
core.set_verbosity('XXX')
@@ -29,6 +23,6 @@ class TestCoreLogs(ChrysalideTestCase):
def testWrongMessage(self):
"""Check for unhandled message level."""
- with self.assertRaisesRegex(Exception, 'Invalid type of message'):
+ with self.assertRaisesRegex(Exception, 'invalid value for LogMessageType'):
- core.log_message(core.LMT_COUNT, 'Message')
+ core.log_message(core.LogMessageType.COUNT, 'Message')