Limit infrastructure fixture scope to function
Currently fixture infrastructure
scope is module
, which means that mock backend keep internal state across multiple tests.
It breaks independence of the tests and requires correct test execution order.
For example:
Passes
def test_updates(...):
some_tests...
def test_update_something_else(...):
other_tests...
Fails
def test_update_something_else(...):
other_tests...
def test_updates(...):
some_tests... <-- fails because mock internal state doesn't reset