Ben Wilson
07/10/2023, 9:49 PMcontext = build_op_context(
resources={
"database": db,
"s3": s3_resource.mock_resource("mock gather s3"),
}
)
to build the context for my test and need to add a mock redshift resource, but can't quite seem to get the setup right.
Thanks!Philip Strnad
07/10/2023, 9:55 PMResourceDefinition.mock_resource()
? I've also had success doing it like this:
s3_mock = MagicMock()
and then setting s3_mock
in the resources dictchris
07/11/2023, 1:31 AMs3_resource.mock_resource
call that you’re doing is just calling the class method mock_resource
that Philip mentions above ^. It should be working to provide a mock in place of the resource, an alternative would be to just directly provide a mock. What issues are you running into with it?