'Tests the get_server function.'

def test_get_server(self):

    my_server = mock.MagicMock()
    self.nova_client.servers.get.side_effect = [my_server, nova_exceptions.NotFound(404)]
    self.assertEqual(my_server, self.nova_plugin.get_server('my_server'))
    self.assertRaises(exception.EntityNotFound, self.nova_plugin.get_server, 'idontexist')
    calls = [mock.call('my_server'), mock.call('idontexist')]
    self.nova_client.servers.get.assert_has_calls(calls)
