mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
add simple summary support to rsync and rsync-s parsers
This commit is contained in:
@ -161,6 +161,18 @@ class MyTests(unittest.TestCase):
|
||||
"""
|
||||
self.assertEqual(jc.parsers.rsync.parse(self.osx_10_14_6_rsync_i_vvv_logfile_nochange, quiet=True), self.osx_10_14_6_rsync_i_vvv_logfile_nochange_json)
|
||||
|
||||
def test_rsync_simple_summary(self):
|
||||
"""
|
||||
Test 'rsync avh' output with a simple summary
|
||||
"""
|
||||
data = '''sending incremental file list
|
||||
|
||||
sent 8.71M bytes received 29.88K bytes 10.99K bytes/sec
|
||||
total size is 221.79G speedup is 25,388.23
|
||||
'''
|
||||
expected = [{"summary":{"sent":8710000,"received":29880,"bytes_sec":10990.0,"total_size":221790000000,"speedup":25388.23},"files":[]}]
|
||||
self.assertEqual(jc.parsers.rsync.parse(data, quiet=True), expected)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user