コード例 #1
0
    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)
コード例 #2
0
 def setUp(self):
     """
     Test case setup functions
     """
     self.api = api.InvenTreeAPI(SERVER,
                                 username=USERNAME,
                                 password=PASSWORD)
コード例 #3
0
 def setUp(self):
     self.api = api.InvenTreeAPI(SERVER, username="******", password="******")
コード例 #4
0
    def setUp(self):


        self.api = api.InvenTreeAPI(SERVER, username=USERNAME, password=PASSWORD)