I write a Python module that accesses OS resources and can change their state (e.g. firewall rules).
So when I create a unit test for removing a rule from the firewall, it only works when the specific rule was added before. This violates the the 'isolation' property of unit tests.
Is there another way to test a module like this? Maybe with a Docker container for testing?