From 107fdc203cec148840b65207f09789b28f0d30d7 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 3 Jul 2018 15:50:56 +0100 Subject: [PATCH] tests/test_utils: Update behaviour of test As part of commit #b3de85 porting to WA3, the behaviour of Enums changed so that the attribute to be fetched is converted to lower case before the lookup occurs. Due to the fact that 'names' is a predefined attribute of the Enum class this clashes and will return the full list of names instead of the individual entry. Update the test to use another non reserved entry. --- tests/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 4f09a478..87a382a4 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -113,8 +113,8 @@ class TestEnumLevel(TestCase): e = enum(['NAMES', 'one', 'two']) assert_in('names', e.levels) assert_list_equal(e.names, ['names', 'one', 'two']) - assert_equal(e.NAMES, 'names') - result = not (e.NAMES != 'names') + assert_equal(e.ONE, 'one') + result = not (e.ONE != 'one') assert_true(result) def test_enum_behavior(self):