def __checkAccounts(self): self.assertIsNotNone(self.config.accounts) self.assertEqual(len(self.config.accounts), 5) accounts = dict() acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Facebook" acc.disabled = False accounts[acc.getRef()] = acc acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Facebook" acc.disabled = True accounts[acc.getRef()] = acc acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Live" acc.disabled = False accounts[acc.getRef()] = acc acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Live" acc.disabled = False accounts[acc.getRef()] = acc acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Live" acc.disabled = False accounts[acc.getRef()] = acc self.assertEqual(accounts, self.config.accounts)
def test_accounts(self): self.assertIsNotNone(self.config.accounts) self.assertEqual(len(self.config.accounts), 1) accounts = dict() acc = Config.Account() acc.accountLogin = "******" acc.password = "******" acc.accountType = "Live" acc.disabled = False acc.ua_desktop = "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136" acc.ua_mobile = "mozilla/5.0 (iphone; cpu iphone os 7_0_2 like mac os x) applewebkit/537.51.1 (khtml, like gecko) version/7.0 mobile/11a501 safari/9537.53" accounts[acc.getRef()] = acc self.assertEqual(accounts, self.config.accounts)