mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
circonus_annotation: reason becomes a string
This commit is contained in:
parent
572ab3987a
commit
c6efb81707
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
|
import re
|
||||||
import uuid
|
import uuid
|
||||||
from urllib3.response import HTTPResponse
|
from urllib3.response import HTTPResponse
|
||||||
|
|
||||||
|
@ -170,5 +171,5 @@ class TestCirconusAnnotation(unittest.TestCase):
|
||||||
with self.assertRaises(AnsibleFailJson) as result:
|
with self.assertRaises(AnsibleFailJson) as result:
|
||||||
self.module.main()
|
self.module.main()
|
||||||
self.assertTrue(result.exception.args[0]['failed'])
|
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)
|
self.assertEqual(send.call_count, 1)
|
||||||
|
|
Loading…
Reference in a new issue