'Testing the dump / load with no dump of file content data'

def test_dump_load_data(self):

    create_folder_structure(1, 1)
    fileobj = self.create_filer_file(Folder.objects.all()[0])
    self.assertEqual(Image.objects.count(), 0)
    image = self.create_filer_image()
    image.save()
    image_size = (image._width, image._height)
    self.assertEqual(Image.objects.count(), 1)
    jdata = StringIO()
    fobj = tempfile.NamedTemporaryFile(suffix=u'.json', delete=False)
    call_command(u'dumpdata', u'filer', stdout=jdata, indent=3)
    complete = os.path.join(fileobj.file.storage.location, fileobj.path)
    os.unlink(complete)
    fileobj.delete()
    fobj.write(jdata.getvalue().encode(u'utf-8'))
    fobj.seek(0)
    call_command(u'loaddata', fobj.name, stdout=jdata)
    self.assertEqual(Folder.objects.all().count(), 1)
    self.assertEqual(File.objects.all().count(), 2)
    self.assertEqual(File.objects.all()[0].original_filename, self.image_name)
    self.assertEqual(Image.objects.count(), 1)
    fileobj = File.objects.all()[0]
    image = Image.objects.all()[0]
    self.assertEqual(image._width, image_size[0])
    self.assertEqual(image._height, image_size[1])
    complete = os.path.join(fileobj.file.storage.location, fileobj.path)
    self.assertFalse(os.path.exists(complete))
