def testEmptyUser(self): loCfg = None try: loCfg = QuickConfig.configForUser("https://", None, "2", False, 1) except Exception as e: pass self.assertIsNone(loCfg) try: loCfg = QuickConfig.configForUser("https://", "", "2", False, 1) except Exception as e: pass self.assertIsNone(loCfg)
def testCredentials_user(self): stored = QuickConfig.readConfiguration(QuickConfig.config_file_path) cfg = QuickConfig.configForUser(stored["server"], stored["standarduser"], stored["standarduserpwd"], 1) token = cfg.getToken(cfg.getUserCredential(UserType.CustomUser)) assert len(token) > 10