def test_failed_logins(self): # Attempt connection where no server exists with self.assertRaises(Exception): a = api.InvenTreeAPI("http://127.0.0.1:1234", username="******", password="******") # Attempt connection with invalid credentials a = api.InvenTreeAPI(SERVER, username="******", password="******") self.assertIsNotNone(a.server_details) self.assertIsNone(a.token)
def setUp(self): """ Test case setup functions """ self.api = api.InvenTreeAPI(SERVER, username=USERNAME, password=PASSWORD)
def setUp(self): self.api = api.InvenTreeAPI(SERVER, username="******", password="******")
def setUp(self): self.api = api.InvenTreeAPI(SERVER, username=USERNAME, password=PASSWORD)