Fixes the UI life-cycle environment test cases for UI update

Yeah I Am aware of it. UI code was written way before we had the code standards in place.
I updated for contentenv.py  this time as I was mainly working on that. Slowly we will be doing the same for other modules too.

Simply do not want to put all my efforts in ONE GO on code standards. Plan is tp slowly move UI code to our code standards.