From c6efb8170787a640ff0a3c9f7d969d4e09086abe Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Tue, 15 Aug 2017 04:45:37 +0200 Subject: [PATCH] circonus_annotation: reason becomes a string --- test/units/modules/monitoring/test_circonus_annotation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/units/modules/monitoring/test_circonus_annotation.py b/test/units/modules/monitoring/test_circonus_annotation.py index 7db9d082b9..652f73f16e 100644 --- a/test/units/modules/monitoring/test_circonus_annotation.py +++ b/test/units/modules/monitoring/test_circonus_annotation.py @@ -2,6 +2,7 @@ import io import json +import re import uuid from urllib3.response import HTTPResponse @@ -170,5 +171,5 @@ class TestCirconusAnnotation(unittest.TestCase): with self.assertRaises(AnsibleFailJson) as result: self.module.main() self.assertTrue(result.exception.args[0]['failed']) - self.assertEqual(result.exception.args[0]['reason'].response.status_code, 403) + self.assertTrue(re.match(r'\b403\b', result.exception.args[0]['reason'])) self.assertEqual(send.call_count, 1)