mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 11:40:22 -07:00
Start converting asserts to self.assert*() so we get better error messages
This commit is contained in:
parent
ccd559137f
commit
c752f012f7
2 changed files with 9 additions and 9 deletions
|
@ -32,7 +32,7 @@ class TestErrors(unittest.TestCase):
|
|||
|
||||
def test_basic_error(self):
|
||||
e = AnsibleError(self.message)
|
||||
assert e.message == self.message
|
||||
self.assertEqual(e.message, self.message)
|
||||
|
||||
def test_error_with_object(self):
|
||||
obj = AnsibleBaseYAMLObject()
|
||||
|
@ -45,4 +45,4 @@ class TestErrors(unittest.TestCase):
|
|||
with patch('__builtin__.open', m):
|
||||
e = AnsibleError(self.message, obj)
|
||||
|
||||
assert e.message == 'this is the error message\nThe error occurred on line 1 of the file foo.yml:\nthis is line 1\n^'
|
||||
self.assertEqual(e.message, 'this is the error message\nThe error occurred on line 1 of the file foo.yml:\nthis is line 1\n^')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue