Add unit tests for dump.py