Was there a particular reason to use an actual file in this test?  If not then it would be best to avoid hitting the file system for testing whenever possible.  The previous use of `dumps` and `loads` was good.