def METHOD_NAME(self):
    """Callback method is not available in the spider passed to from_dict"""
    spider = TestSpiderDelegation()
    r = Request("http://www.example.com", callback=spider.delegated_callback)
    d = r.to_dict(spider=spider)
    self.assertRaises(ValueError, request_from_dict, d, spider=Spider("foo"))