Exemple #1
0
 def test_blnet_web_log_out(self):
     """ Test setting digital values """
     blnet = BLNETWeb(self.url, password=PASSWORD, timeout=10)
     self.assertFalse(blnet.logged_in())
     with blnet as blnet:
         self.assertTrue(blnet.logged_in())
     self.assertFalse(blnet.logged_in())
Exemple #2
0
 def test_blnet_web_log_in(self):
     """
     Test logging in via different urls
     and that log out after a with clause happens correctly
     """
     with BLNETWeb(self.url, password=PASSWORD, timeout=10) as blnet:
         self.assertTrue(blnet.logged_in())
     # test without http
     blnet = BLNETWeb("{}:{}".format(ADDRESS, self.port), password=PASSWORD, timeout=10)
     with blnet as blnet:
         self.assertTrue(blnet.logged_in())