Skip to content

Instantly share code, notes, and snippets.

@blaix
blaix / test.py
Created November 26, 2012 22:12
Patching an entire test class in python
from unittest import TestCase
from mock import patch
from my.module import MyClass
@patch("my.module.OtherClass")
class TestMyClass(TestCase):
def test_something(self, mocked_other_class):