'Testing the case of dump full and empty dataset'

def test_dump_data_base(self):

    fileobj = self.create_filer_file()
    (jdata, jdata2) = (StringIO(), StringIO())
    call_command(u'dumpdata', u'filer', stdout=jdata)
    fileobj.delete()
    call_command(u'dumpdata', u'filer', stdout=jdata2)
    data = json.loads(jdata.getvalue())
    data2 = json.loads(jdata2.getvalue())
    self.assertEqual(len(data), 1)
    self.assertEqual(len(data2), 0)
