Commit 92dbf342 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Ensure that a file is closed in the tests

parent 69a4f383
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -52,7 +52,8 @@ class DumpDataAssertMixin(object):
                                                      'exclude': exclude_list,
                                                      'primary_keys': primary_keys})
        if filename:
            command_output = open(filename, "r").read()
            with open(filename, "r") as f:
                command_output = f.read()
            os.remove(filename)
        else:
            command_output = new_io.getvalue().strip()