python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Python3 unit tests for API
I could use some much needed guidance on unit tests for python3
All my files are in the same directory. No Sub folders.
Params is a class that gets initialized in the script. FILE 1 works fine connect...
Dawson
Votes: 0
Answers: 1
Python mock not applied to object under test
I am attempting to mock an object to perform some testing
test.py
@patch("api.configuration.client.get_configuration")
def test(mock_client_get_configuration):
mock_client_get_configurat...
Remotec
Votes: 0
Answers: 0
MagicMock's reset_mock not properly resetting sub-mock's side_effect
I have a long-lived patch on a class, whose made instance undergoes multiple batches of assertions. Please see the below code snippet for the scenario.
It exposes (what I think is annoying) behavior ...
Intrastellar Explorer
Votes: 0
Answers: 1
How to magic mock long chained calls?
To test the following functino, I want to assert .filter() is called once with parameter filters.
def get_instances(session: boto3.session.Session, filters):
instances = session.resource('ec2').in...
ca9163d9
Votes: 0
Answers: 1