mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add writelines_calls property
This commit is contained in:
parent
42fa842456
commit
543385fd02
1 changed files with 7 additions and 0 deletions
|
@ -138,6 +138,13 @@ class MockFH(object):
|
|||
'''
|
||||
return [x[1][0] for x in self.write.mock_calls]
|
||||
|
||||
@property
|
||||
def writelines_calls(self):
|
||||
'''
|
||||
Return a list of all calls to the .writelines() mock
|
||||
'''
|
||||
return [x[1][0] for x in self.writelines.mock_calls]
|
||||
|
||||
def _read(self, size=0):
|
||||
if not isinstance(size, six.integer_types) or size < 0:
|
||||
raise TypeError('a positive integer is required')
|
||||
|
|
Loading…
Add table
Reference in a new issue