mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -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:
parent
b1c12ca120
commit
57778eb429
@ -23,7 +23,8 @@ class UnifiedJobsUnitTest(SimpleTestCase):
|
||||
unified_job = UnifiedJob()
|
||||
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')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user