upgrading tests for python3: testQueryNoNet, testCS, testSIA with some necessary changes to code