Fixed IPython magic tests