I found I often use same pattern in tests again and again:
mock_get_data = mock.MagicMock()
mock_get_data.get_data.return_value = "mocked DB data"
mock_db = mock.Mock(spec=DBClass, return_value=mock_get_data)
It would be used for testing (with patching) that type of code:
db_connector = DBClass(settings)
print db_connector.get_data()
Is any way to make that 'double mock' thing shorter?