avoid creating clutter during tests

Mock the `write_details` method of output test objects to avoid them
creating clutter when running tests. The write_details method itself
needs unit tests, which should then not use an instance provided by
__create().