Add test for IPython display
Fix two queries used in the tests