'Test the community to receive a request message twice.'

def test_receive_request_twice(self):

    (node, other) = self.create_nodes(2)
    target_other = self._create_target(node, other)
    transaction = {'up': 10, 'down': 5}
    TestTriblerChainCommunity.set_expectation(node, other, 50, 50)
    TestTriblerChainCommunity.set_expectation(other, node, 50, 50)
    TestTriblerChainCommunity.create_block(node, other, target_other, transaction)
    block = node.call(node.community.persistence.get_latest, node.my_member.public_key)
    block_req = node.community.get_meta_message(HALF_BLOCK).impl(authentication=tuple(), distribution=(node.community.claim_global_time(),), destination=(target_other,), payload=(block,))
    other.give_message(block_req, node)
    self.assertBlocksInDatabase(other, 2)
    self.assertBlocksInDatabase(node, 2)
    with self.assertRaises(StopIteration):
        node.receive_message(names=[HALF_BLOCK, CRAWL]).next()
