mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03:30
mock stdout unit test patch failure fix
Adjust some mock.patch behavior to match the new stdout behavior where we need to check a file's size as well as its existence
This commit is contained in:
@@ -23,7 +23,8 @@ class UnifiedJobsUnitTest(SimpleTestCase):
|
|||||||
unified_job = UnifiedJob()
|
unified_job = UnifiedJob()
|
||||||
unified_job.result_stdout_file = 'dummy'
|
unified_job.result_stdout_file = 'dummy'
|
||||||
|
|
||||||
result = unified_job.result_stdout_raw_handle()
|
with mock.patch('os.stat', st_size=1):
|
||||||
|
result = unified_job.result_stdout_raw_handle()
|
||||||
|
|
||||||
self.assertEqual(result, 'my_file_handler')
|
self.assertEqual(result, 'my_file_handler')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user