Added py.test tests