def test_delete_share(self):
        """Test delete shares from share-er and share-ee"""
        user1 = self.factory.make_user(username='sharer')
        root = StorageObject.objects.get_root(user1)
        share = self.factory.make_share(
            subtree=root, shared_to=self.user._user, name='Share')
        share = self.gw.get_share(share.id, accepted_only=False)
        self.assertEqual(share.status, STATUS_LIVE)
        self.gw.delete_share(share.id)
        # share is now inaccessible
        self.assertRaises(
            errors.DoesNotExist, self.gw.get_share, share.id,
            accepted_only=False)
        # make it live again so we can test it with the share-ee
        Share.objects.filter(id=share.id).update(status=STATUS_LIVE)
        # get user1's gateway and delete it
        user1 = make_storage_user(username=user1.username)
        user1._gateway.delete_share(share.id)