'Model.delete() should return the number of deleted rows and a
dictionary with the number of deletions for each object type.'

def test_model_delete_returns_num_rows(self):

    r = R.objects.create()
    h1 = HiddenUser.objects.create(r=r)
    h2 = HiddenUser.objects.create(r=r)
    HiddenUser.objects.create(r=r)
    HiddenUserProfile.objects.create(user=h1)
    HiddenUserProfile.objects.create(user=h2)
    m1 = M.objects.create()
    m2 = M.objects.create()
    MR.objects.create(r=r, m=m1)
    r.m_set.add(m1)
    r.m_set.add(m2)
    r.save()
    existed_objs = {R._meta.label: R.objects.count(), HiddenUser._meta.label: HiddenUser.objects.count(), A._meta.label: A.objects.count(), MR._meta.label: MR.objects.count(), HiddenUserProfile._meta.label: HiddenUserProfile.objects.count(), M.m2m.through._meta.label: M.m2m.through.objects.count()}
    (deleted, deleted_objs) = r.delete()
    self.assertEqual(deleted, sum(existed_objs.values()))
    for (k, v) in existed_objs.items():
        self.assertEqual(deleted_objs[k], v)
