예제 #1
0
    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)
예제 #2
0
 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