question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

assert_all_mocked - default auto mocked

See original GitHub issue

Hello,

Thanks for your great tool ! its very useful. I am not sure to well understand the option assert_all_mocked and why the default behavior when disabled is all non-routed requests will be auto mocked with status code 200.

In my case, I trigger many httpx calls on many API. I just wanna mock one specific call (e.g. side effect) and let the rest of calls

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Lujenicommented, Nov 9, 2021

@lundberg yep I understand better . thanks for your time and you answers !

0reactions
lundbergcommented, Nov 8, 2021

I guess your problem is solved and we can consider closing this issue @Lujeni?

Read more comments on GitHub >

github_iconTop Results From Across the Web

unittest.mock — mock object library — Python 3.11.1 ...
Auto -speccing creates mock objects that have the same attributes and methods ... unsafe: By default, accessing any attribute whose name starts with...
Read more >
Jest how to assert method calls on mocked classes
It looks like you're calling the mocked constructor several times, and getting back several different instances of the mocked object.
Read more >
Mock Functions - Jest
Mock functions allow you to test the links between code by erasing the ... These mock members are very useful in tests to...
Read more >
Defining and asserting mock behavior - Unitils –
You can pass the instance that needs to be thrown or just pass the exception class. An instance will then automatically be created...
Read more >
Jest Mocking Strategies | Mercedes Bernard
To mock its implementation, we use a default import, mock the module, and provide a factory (a function which will run when the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found