Skip to main content
-3 votes
1 answer
57 views

I created a mock server in Postman, and I link it with my collection. I clicked "Add Example" to my request and I created a response. But when I make that call, in response I get a 404 with: ...
Selman's user avatar
  • 364
1 vote
1 answer
86 views

An instance of class A starts a sub-process that calls a method of an instance of class B. It works as expected in real-life, but unit tests fail because the mock object replacing the object of class ...
Cutter's user avatar
  • 1,861
1 vote
2 answers
93 views

I am using Python 3.13.2 I have async with connection.execute(query) as cursor: block in my endpoint, which I want to mock (connection is an object generated by await aiosqlite.connection(':memory:'). ...
Amit Tendulkar's user avatar
0 votes
1 answer
50 views

I am using Python 3.13.2 I am trying a sample use case of using AsyncMock to simulate fetching of mock rows from DB to test my endpoint (using pytest-asyncio). I have also included a non-mock endpoint ...
Amit Tendulkar's user avatar
-1 votes
0 answers
46 views

I have an Angular 20 app, running Storybook 10. My component works perfectly, however, I'm trying to set up Storybook to mock a navigation link. I just can't seem to get it to work. This is my ...
Brian Kitt's user avatar
0 votes
1 answer
97 views

I have test method using mockito 5 @Test public void test_increaseUserScore_Successful() throws CannotCreateCachedUserException { when(cachedUserRepository .existsById(...
JZARGO's user avatar
  • 19
2 votes
1 answer
75 views

I have a large Angular App that works fine. (v20 if it matters) I recently added a new service to my App.Component, and now I'm getting the following error. ONLY in Karma, the service works as ...
Brian Kitt's user avatar
Best practices
1 vote
2 replies
170 views

I am part of a team that is developing a general-purpose, Python-based 3D mesh viewer using the VTK (Python) library. Read about VTK here: https://docs.vtk.org/en/latest/getting_started Our Python ...
xblz's user avatar
  • 40
0 votes
1 answer
110 views

I have a POST endpoint with fastapi that goes a little like this. This takes in an excel file and turns it into a pandas dataframe. @router.post( "/endpoint/upload_excel", status_code=status....
nijj67's user avatar
  • 11
0 votes
1 answer
53 views

I want to create tests but every time I run a test it triggers celery and celery creates instances into my local db. that means that if I run those tests in the prod or dev servers, then it will ...
Ελευθέριος Μπάρμπας's user avatar
0 votes
0 answers
74 views

I have a springboot maven project in which I have a very simple class which has a static method which takes in a http client, some configs and an object mapper This class is under package com.cs....
vineeth's user avatar
  • 16
0 votes
1 answer
102 views

I am using ceedling to unit test a file called adc.c that depends on functions defined in HAL file stm32h7xx_hal_adc_ex.c. The documentation says that I should only include the top level header file ...
PM Laforest's user avatar
-1 votes
1 answer
44 views

I have come across this problem when making my unit tests. from unittest.mock import AsyncMock, patch import pydantic # class Parent(): # Using non-pydantic class works class Parent(pydantic....
Automatico's user avatar
  • 12.9k
2 votes
1 answer
857 views

private readonly IMapper _mapper; public CreateDepartmentRequestHandlerTests() { var config = new MapperConfiguration(cfg => cfg.AddProfile(new CreateDepartmentProfile())); _mapper = ...
Saidabror's user avatar
1 vote
1 answer
65 views

I am trying to mock.patch sys.stdout to StringIO as a decorator to record the output for testing. As a 'with' statement it works this way: with mock.patch('sys.stdout', new_callable = StringIO) as ...
user1688726's user avatar

15 30 50 per page
1
2 3 4 5
1065