This seems like an odd way to check that the valid resources are accessible. Might be better to mock out `pkg_resources.resource_stream` instead, and validate that you get the `Mock().return_value` out of the function, and that the mock was called with the right arguments.