def test_node_not_on_volume(self):
        """Test to make sure nodes can't be retreived if they are not
        on the volume."""
        share_dao = SharedDirectory(self.rw_share, by_user=self.sharer)
        sgw = ReadWriteVolumeGateway(self.user, share=share_dao)
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_subdirectory, uuid.uuid4(), 'name')
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_subdirectory, uuid.uuid4(), 'name')
        # now create some files from the sharer but are not in the shared
        # directory
        vgw = self.user._gateway.get_root_gateway()
        a_dir = vgw.make_subdirectory(vgw.get_root().id, 'DirName')
        a_file = vgw.make_file(a_dir.id, 'TheName')
        # we shouldn't be able to use these nodes on the share gateway
        self.assertRaises(errors.DoesNotExist,
                          sgw.get_node, a_dir.id)
        self.assertRaises(errors.DoesNotExist,
                          sgw.get_node, a_file.id)
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_subdirectory, a_dir.id, 'name')
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_subdirectory, a_file.id, 'name')
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_file, a_dir.id, 'name')
        self.assertRaises(errors.DoesNotExist,
                          sgw.make_file, a_file.id, 'name')