def testDeleteSimple(self):
        session = yield self.data.create(self)
        t = yield session.query(Instrument).delete()
        all = yield session.query(Instrument).all()
        self.assertEqual(all, [])
        # There should be only keys for indexes and auto id
        backend = session.model(Instrument).backend
        if backend.name == 'redis':
            keys = yield session.keys(Instrument)
            self.assertEqual(len(keys), 1)
            self.assertEqual(keys[0], backend.basekey(Instrument._meta, 'ids'))
            yield session.flush(Instrument)
            keys = yield session.keys(Instrument)
            self.assertEqual(len(keys), 0)
Test delete on models without related models
dataset/ETHPy150Open lsbardel/python-stdnet/tests/all/query/delete.py/TestDeleteScalarFields.testDeleteSimple