def test_exist_in_pack_content(self, tmp_path): env = Environment(tmp_path) parameters = [ { 'custom_content_object': env.INTEGRATION_CUSTOM_CONTENT_OBJECT, 'exist_in_pack': True }, { 'custom_content_object': env.SCRIPT_CUSTOM_CONTENT_OBJECT, 'exist_in_pack': True }, { 'custom_content_object': env.PLAYBOOK_CUSTOM_CONTENT_OBJECT, 'exist_in_pack': True }, { 'custom_content_object': env.LAYOUT_CUSTOM_CONTENT_OBJECT, 'exist_in_pack': True }, { 'custom_content_object': env.FAKE_CUSTOM_CONTENT_OBJECT, 'exist_in_pack': False }, ] with patch.object(Downloader, "__init__", lambda a, b, c: None): downloader = Downloader('', '') downloader.pack_content = env.PACK_CONTENT for param in parameters: assert downloader.exist_in_pack_content( param['custom_content_object']) is param['exist_in_pack']
def test_exist_in_pack_content(self, custom_content_object, exist_in_pack): assert EnvironmentGuardian.verify_environment() with patch.object(Downloader, "__init__", lambda a, b, c: None): downloader = Downloader('', '') downloader.pack_content = PACK_CONTENT assert downloader.exist_in_pack_content(custom_content_object) is exist_in_pack