'Upon connecting a ``SetNodeEraCommand`` is sent with the current
node\'s era and UUID.'

def test_send_era_on_connect(self):

    client = AgentAMP(self.reactor, self.service)
    server_locator = UpdateNodeEraLocator()
    server = AMP(locator=server_locator)
    pump = connectedServerAndClient((lambda : client), (lambda : server))[2]
    pump.flush()
    self.assertEqual(dict(era=server_locator.era, uuid=server_locator.uuid), dict(era=unicode(self.service.era), uuid=unicode(self.deployer.node_uuid)))
