diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-06-30 22:10:07 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-06-30 22:10:07 (GMT) |
commit | d3c1294c05579db9dd5a1436883fe3fb78a052be (patch) | |
tree | 73d69a89271c15f1273cd1259ac85a276f1b9528 /tests/core | |
parent | 90184484440afd7bc4b85587f450c1b9ccd6e8de (diff) |
Fixed some cases from the test suite.
Diffstat (limited to 'tests/core')
-rw-r--r-- | tests/core/logs.py | 14 |
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') |