Added python test code

As above