dimanche 17 septembre 2017

[Python][Windows]Run setupclass as Admin and remaining test as a standard user

I am trying to run a test which sets some of the win reg keys so i need to run the test as a admin, but i want to test the remaining parts as a standard user. This is for an automated test.(so i cant create 2 scripts and run 1 in admin mode and other in standard mode)

class abctest(unittest.Testcase):

def setUpClass(cls):

 set_regkeys

def setup(self):

 Normaluser_setup

def test1(self):

 do teststeps

Aucun commentaire:

Enregistrer un commentaire