class TestResultArchiver(unittest.TestCase):

    def setUp(self):
        self.ch = ConfigHolder()
        self.ch.set('serviceurl', endpoint)
        self.ch.set('verboseLevel', 3)

        self.client = Client(self.ch)
        self.client.login(username, password)
        self.ch.set('endpoint', endpoint)
        self.ch.set('session', self.client.get_session())

    def tearDown(self):
        shutil.rmtree(run_uuid, ignore_errors=True)
        try: self.client.logout()
        except: pass

    @unittest.skipIf(not all([username, password, run_uuid]),
                     "Live test. Creds not set.")
    def test_get_reports(self):
        rg = ReportsGetter(self.ch)
        rg.get_reports(run_uuid)
        self.assertTrue(os.path.isdir(run_uuid))
class TestResultArchiver(unittest.TestCase):
    def setUp(self):
        self.ch = ConfigHolder()
        self.ch.set('serviceurl', endpoint)
        self.ch.set('verboseLevel', 3)

        self.client = Client(self.ch)
        self.client.login(username, password)
        self.ch.set('endpoint', endpoint)
        self.ch.set('session', self.client.get_session())

    def tearDown(self):
        shutil.rmtree(run_uuid, ignore_errors=True)
        try:
            self.client.logout()
        except:
            pass

    @unittest.skipIf(not all([username, password, run_uuid]),
                     "Live test. Creds not set.")
    def test_get_reports(self):
        rg = ReportsGetter(self.ch)
        rg.get_reports(run_uuid)
        self.assertTrue(os.path.isdir(run_uuid))
Beispiel #3
0
 def doWork(self):
     ch = ConfigHolder(self.options)
     client = Client(ch)
     client.logout()
 def doWork(self):
     ch = ConfigHolder(self.options)
     client = Client(ch)
     client.logout()