mindflayer / python-mocket

a socket mock framework - for all kinds of socket animals, web-clients included
BSD 3-Clause "New" or "Revised" License
280 stars 42 forks source link

Refactored the mocketize decorator #150

Closed micheles closed 3 years ago

micheles commented 3 years ago

This is how the decorator module should be used. Not all tests pass on my machine but I guess I am missing some infrastructure and the problem has nothing to do with my change.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

mindflayer commented 3 years ago

Someone has just opened this issue and it looks like the same problem that makes your tests failing. I'll have a look at it then I'll merge this PR. Thanks for the refactor, I like it.

mindflayer commented 3 years ago

@micheles do you mind merging from my master?

mindflayer commented 3 years ago

I tried to apply your changes to master in this PR and some tests are still failing, even if I solved the issue related to urllib3.

https://github.com/mindflayer/python-mocket/pull/153

mindflayer commented 3 years ago

Here you can see that now master is able to run all the tests without pinning urllib3: https://github.com/mindflayer/python-mocket/actions/runs/925082757

mindflayer commented 3 years ago

I'll try to fix the PR #153 where I applied the patch from yours. I believe it's something related to your refactor which broke the AsyncMocketizer.

micheles commented 3 years ago

I have no time to look at this now. Let's keep the status quo.