Skip to content
Snippets Groups Projects
Commit 7b960f96 authored by Thomas Jürges's avatar Thomas Jürges
Browse files

Task SW-381: Mocking needs the path to the object not the source

Reminder for myself:
Mocking is odd and does not follow common sense.  When I want to mock out a
function joe that is imported into foo.bar like this:
from there.here.willy import joe
then I have to mock it like so:
@mock.patch("foo.bar.joe")

Common sense would tell to mock it like so:
@mock.patch("there.here.willy.joe")
parent 41fbfc7a
No related branches found
No related tags found
1 merge request!87Lsmr epic
......@@ -84,7 +84,7 @@ class ScheduleCheckerTest(unittest.TestCase):
self.assert_all_services_closed()
@mock.patch('lofar.sas.resourceassignment.common.specification.movePipelineAfterItsPredecessors')
@mock.patch('lofar.sas.resourceassignment.resourceassigner.schedulechecker.movePipelineAfterItsPredecessors')
def test_checkScheduledAndQueuedPipelines(self, movePipeline_mock):
""" Test whether all scheduled/queued pipelines get a move request. """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment