'The symbol django.core.files.NamedTemporaryFile is assigned as
a different class on different operating systems. In
any case, the result should minimally mock some of the API of
tempfile.NamedTemporaryFile from the Python standard library.'

def test_namedtemporaryfile_closes(self):

    tempfile = NamedTemporaryFile()
    self.assertTrue(hasattr(tempfile, 'closed'))
    self.assertFalse(tempfile.closed)
    tempfile.close()
    self.assertTrue(tempfile.closed)
