Fixed Transaction Issue in testing

Fixed transaction issue in testing.py