def test_dump_data_base(self):
        fileobj = self.create_filer_file()
        jdata, jdata2 = StringIO(), StringIO()
        call_command("dumpdata", "filer", stdout=jdata)
        fileobj.delete()
        call_command("dumpdata", "filer", stdout=jdata2)
        data = json.loads(jdata.getvalue())
        data2 = json.loads(jdata2.getvalue())
        self.assertEqual(len(data), 1)
        self.assertEqual(len(data2), 0)
Testing the case of dump full and empty dataset
dataset/ETHPy150Open divio/django-filer/filer/tests/dump.py/DumpDataTests.test_dump_data_base