Skip to main content

All Questions

Tagged with
0 votes
0 answers
44 views

Getting 'Account not authorized' error with OAuth 2.0 password grant type in Python script

I’m trying to fetch an OAuth 2.0 token using the password grant type in a Python script for an API integration with a cloud service (Infor CloudSuite). The script uses the requests library to make a ...
Scott Badger's user avatar
1 vote
0 answers
1k views

How to mock FastAPI Request

I'm trying to test a FastAPI endpoint but I'm getting the fllowing eroor AttributeError: 'State' object has no attribute 'session' Whern the test endpoint is triggered, it is creating an object of ...
Prashanth Bairu's user avatar
1 vote
3 answers
1k views

Tool to Compare Locust Load Test Results

I'm looking for any recommendations on a tools that can be used to compare load test statistics that Locust outputs. Currently, after each run, Locust produces either an HTML page in its Web UI or a ...
Chad A's user avatar
  • 11
0 votes
2 answers
78 views

How to enter a new entry to a API server using requests.post?

This is the question from the course I am following I am getting an error while trying to put the required details by using requests.post. When I am using request.post the wesite should be uploaded ...
Sasani Perera's user avatar
0 votes
1 answer
280 views

Test an API with Python

I am writing some tests for an API using Python and PyTest. The tests are something like this: def test_stackoverflow(): response = stackoverflow(parameter1, parameter2) assert response....
ᴜsᴇʀ's user avatar
  • 1,158
0 votes
3 answers
1k views

Pytest/Locust: ModuleNotFoundError No module named

Ive tried to find anwsers on similar topics, but... nothing helped. When I run my regular tests with pytest -m blablabla - there are no problems, but when I run locust by command: locust -f ...
Evgenii's user avatar
3 votes
0 answers
448 views

Why multiple tests are not allowed in robotframework-datadriver while using csv file.. is there some workaround?

Problem Statement: I want to have 1 robot file with 3 Test cases 1st test case would not use any Test Template 2nd test case would use a Test Template using Variables in 'Variables' section so as to ...
Manish Arya's user avatar
0 votes
2 answers
1k views

How to test query_params?

How can I test query_params? I have provided a response and a request, but it still doesn't work. Initially, the error was like this: price = int(self.context.get('request').query_params.get('price', ...
Ramil's user avatar
  • 28
0 votes
2 answers
1k views

What is the best Rest Assured alternative for Python API testing?

In Java, we have Rest Assured for API testing. In python, what are the best possible alternatives?
M Reus's user avatar
  • 21
-1 votes
1 answer
814 views

How to I declare Global Variable in Robot Framework and use it in another robot file

In the response I'm getting one access token which I'm storing in ${Token} variable and want to set it as Global variable and want to use it in SendFax.robot file **GenerateToken.robot** *** ...
durgesh dhamal's user avatar
0 votes
2 answers
929 views

Getting 401 response while making get request with bearer token (Python)

Here is my code--- token = APIUtilities() auth_token = token.get_token(end_point=App_Config.BASE_URL+"/connect/token", username="...
Mayank Srivastava's user avatar
1 vote
1 answer
6k views

I want to get orderID from API response using selenium python

I want to get the order ID from the API response. When I click on the Create Order button it will send a POST API request and return the unique ID that I want. This is my order creation code. from ...
Krupal Vaghasiya's user avatar
0 votes
1 answer
1k views

Django testing of views.py and model.py

I am new to django testing am doing the testing for my views.py file which cintain alot oif classes Here we are take one of the class among the others the views.py file looks like class ...
Adarsh Srivastav's user avatar
0 votes
1 answer
579 views

Missing request - Pact python

I'm new to pact and I've understood the concept but having hard time understanding and implementing the code. Here I'm trying to do a simple pact for get_users from reqres.in. I believe the first (...
Vishal Prabhu's user avatar
0 votes
1 answer
35 views

DRF ApiTest runs on old code, doesn't update

Running ApiTest in a Django-REST application. After correcting something and running tests, they show old errors. I'm running the app with docker-compose. Previously deleting the database volume ...
Lev Slinsen's user avatar

15 30 50 per page