new human_readable filter to transform bits and bytes into cake (not really)

This commit is contained in:
Brian Coca
2015-07-07 15:58:18 -04:00
parent 08fcd82331
commit 688088547b
2 changed files with 37 additions and 0 deletions

View File

@@ -41,3 +41,11 @@
that:
- 'diff_result.stdout == ""'
- name: Verify human_readable
assert:
that:
- '"10.00 KB" == 10240|human_readable'
- '"97.66 MB" == 102400000|human_readable'
- '"0.10 GB" == 102400000|human_readable(unit="G")'
- '"0.10 Gb" == 102400000|human_readable(isbits=True, unit="G")'