Switch asserting to pytest solution (#infra)
During this some of code bad habits were discovered.
old bad habbit -> pytest
self.assertEquals(value, None) -> assert value is None
Also the output is a bit smaller so some test code could be moved to one line.
(cherry picked from commit 2139937baeae45c0aa3186e678014da1b2174622)