From 83533bd2a9dded5423c12ab945590516b6076985 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Thu, 7 Oct 2021 15:16:45 +0200 Subject: [PATCH 1/2] Fix token expiration expection verification for JS Javascript only checks for the error code --- tests/stub/authorization/test_authorization.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/stub/authorization/test_authorization.py b/tests/stub/authorization/test_authorization.py index 8508759ca..5e84b39bf 100644 --- a/tests/stub/authorization/test_authorization.py +++ b/tests/stub/authorization/test_authorization.py @@ -56,6 +56,9 @@ def assert_is_token_error(self, error): self.assertEqual('Neo.ClientError.Security.TokenExpired', error.code) self.assertIn("Token expired", error.msg) + elif driver == 'javascript': + # only test for code + pass else: self.fail("no error mapping is defined for %s driver" % driver) From 2f17411b76000153d96ffcab5a9ae8d27d6ea1e5 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Thu, 7 Oct 2021 16:17:28 +0200 Subject: [PATCH 2/2] addressing comments in the pR --- tests/stub/authorization/test_authorization.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/stub/authorization/test_authorization.py b/tests/stub/authorization/test_authorization.py index 5e84b39bf..edb12bd3e 100644 --- a/tests/stub/authorization/test_authorization.py +++ b/tests/stub/authorization/test_authorization.py @@ -43,7 +43,7 @@ def assert_is_token_error(self, error): self.assertEqual( "", error.errorType ) - elif driver == 'go': + elif driver in ['go', 'javascript']: self.assertEqual('Neo.ClientError.Security.TokenExpired', error.code) self.assertIn( @@ -56,9 +56,6 @@ def assert_is_token_error(self, error): self.assertEqual('Neo.ClientError.Security.TokenExpired', error.code) self.assertIn("Token expired", error.msg) - elif driver == 'javascript': - # only test for code - pass else: self.fail("no error mapping is defined for %s driver" % driver)