I'd use a doctest like:
```
>>> file_md5sum = hashlib.md5(open('html.py').read()).hexdigest
>>> get_cache_buster(method='md5') == file_md5sum
```