'Regression test for bug 1124319; ensures that deleted apps also delete
any respective FeedShelfMembership objects.'

def test_shelf_get_apps_deleted_app(self):

    app_id = self.app_ids.pop()
    ok_((FeedShelfMembership.objects.filter(app__id=app_id).count() >= 1))
    Webapp.objects.get(pk=app_id).delete()
    eq_(FeedShelfMembership.objects.filter(app__id=app_id).count(), 0)
    try:
        serializers.FeedShelfSerializer(self.shelf, context=self.context).data
    except Webapp.DoesNotExist:
        self.fail('Deleted    app    does    not    delete    shelf    membership    object.')
