{"id":59152,"date":"2023-11-17T12:07:24","date_gmt":"2023-11-17T06:37:24","guid":{"rendered":"https:\/\/2thenew.xyz\/blog\/?p=59152"},"modified":"2023-12-05T16:50:29","modified_gmt":"2023-12-05T11:20:29","slug":"mocking-vs-monkey-patching-in-python","status":"publish","type":"post","link":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/","title":{"rendered":"Mocking VS Monkey Patching in Python"},"content":{"rendered":"<h1>What is Monkey Patching?<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-59416 size-large\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-1024x536.png\" alt=\"Blog image\" width=\"625\" height=\"327\" srcset=\"https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-1024x536.png 1024w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-300x157.png 300w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-768x402.png 768w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-624x327.png 624w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie.png 1200w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><span class=\"l xc xd xe bn xf xg xh xi xj cn\">M<\/span>onkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In order to test our piece of code, we can tweak the behavior of that module.<\/p>\n<pre>#test_monkey.py\r\nclass A:\r\ndef func(self):\r\nprint('I am method in class A')\r\n\r\nimport test_monkey\r\ndef monkey_func(self):\r\nprint('Hi I am monkey method')\r\n\r\ntest_monkey.A.func = monkey\r\nobj = test_monkey.A()\r\nobj.func()\r\n\r\n<\/pre>\n<p>Output<\/p>\n<p>Hi I am monkey method<\/p>\n<h2>What is Mocking?<\/h2>\n<p><span class=\"l xc xd xe bn xf xg xh xi xj cn\">M<\/span>ocking is defined as the set of different types of techniques that help achieve the goal of isolating units or pieces of code to test them independently while simulating the environment in which the unit of code exists.<\/p>\n<p>In simple terms, mocking helps developers test a unit of code that may have dependencies on others. For example, I am implementing a caching layer over my database layer, which includes writing code to get\/set data from\/to Redis before performing any database operations to test this functionality. I don\u2019t actually need to set\/get data to\/from Redis I can create a mock function that will create the illusion that I am able to get\/set data to Redis.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-59151 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/10\/mocking.jpg\" alt=\"Blog image\" width=\"703\" height=\"302\" srcset=\"https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/10\/mocking.jpg 703w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/10\/mocking-300x129.jpg 300w, https:\/\/2thenew.xyz\/blog\/wp-content\/uploads\/2023\/10\/mocking-624x268.jpg 624w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/p>\n<p><i>Want to learn more about mocking and its techniques, check this <a class=\"af yf\" href=\"https:\/\/www.ponicode.com\/shift-left\/what-is-mocking\" target=\"_blank\" rel=\"noopener ugc nofollow\">link<\/a><\/i>.<\/p>\n<h2>How is mocking different from monkey patching?<\/h2>\n<p>Monkey patching replaces a function\/method\/class with another at runtime for testing purposes, fixing a bug, or otherwise changing behavior. On the other hand, mocking uses monkey patching to replace part of your software under test with mock objects. It provides more functionality to write unit tests, such as:<\/p>\n<ul>\n<li>It records how mock objects are being called, so you can test the calling behavior of your code with asserts.<\/li>\n<li>A handy decorator <em class=\"yb\" style=\"font-size: 1rem;\">patch()<\/em><span style=\"font-size: 1rem;\">\u00a0for the actual monkey patching.<\/span><\/li>\n<li>You can make mock objects to return specific values\u00a0<em class=\"yb\">(return_value)<\/em>, and raise specific exceptions (<em class=\"yb\">side_effect<\/em>).<\/li>\n<\/ul>\n<h1 id=\"97e2\" class=\"vn vo rt be vp il vq im in io vr ip iq ir vs is it iu vt iv iw ix vu iy iz vv bj\" data-selectable-paragraph=\"\">Conclusion<\/h1>\n<p>Hope this blog helps you understand the basics of Monkey Patching and Mocking and also helps you in understanding the difference or use case of mocking and monkey patching. For more details on <a class=\"af yf\" href=\"https:\/\/www.javatpoint.com\/monkey-patching-in-python\" target=\"_blank\" rel=\"noopener ugc nofollow\">Monkey Patching<\/a>\u00a0and\u00a0<a class=\"af yf\" href=\"https:\/\/docs.python.org\/3\/library\/unittest.mock.html\" target=\"_blank\" rel=\"noopener ugc nofollow\">Mocking<\/a>\u00a0please refer link.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In [&hellip;]<\/p>\n","protected":false},"author":1677,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":646,"footnotes":""},"categories":[1994],"tags":[1358],"class_list":["post-59152","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-python"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Gautam Rishi\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Mocking VS Monkey Patching in Python | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Mocking VS Monkey Patching in Python | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#article\",\"name\":\"Mocking VS Monkey Patching in Python | TO THE NEW Blog\",\"headline\":\"Mocking VS Monkey Patching in Python\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gautam-rishi\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2023\\\/11\\\/Czym_jest_monkey_patching_w_Pythonie-1024x536.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#articleImage\"},\"datePublished\":\"2023-11-17T12:07:24+05:30\",\"dateModified\":\"2023-12-05T16:50:29+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#webpage\"},\"articleSection\":\"Software development, python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/software-development\\\/#listItem\",\"name\":\"Software development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/software-development\\\/#listItem\",\"position\":2,\"name\":\"Software development\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/software-development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#listItem\",\"name\":\"Mocking VS Monkey Patching in Python\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#listItem\",\"position\":3,\"name\":\"Mocking VS Monkey Patching in Python\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/software-development\\\/#listItem\",\"name\":\"Software development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gautam-rishi\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gautam-rishi\\\/\",\"name\":\"Gautam Rishi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/e19afca4-f630-42c9-b4fd-f5e366e8183b_Gautam-Rishi-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Gautam Rishi\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/\",\"name\":\"Mocking VS Monkey Patching in Python | TO THE NEW Blog\",\"description\":\"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mocking-vs-monkey-patching-in-python\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gautam-rishi\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gautam-rishi\\\/#author\"},\"datePublished\":\"2023-11-17T12:07:24+05:30\",\"dateModified\":\"2023-12-05T16:50:29+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Mocking VS Monkey Patching in Python | TO THE NEW Blog","description":"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In","canonical_url":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#article","name":"Mocking VS Monkey Patching in Python | TO THE NEW Blog","headline":"Mocking VS Monkey Patching in Python","author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gautam-rishi\/#author"},"publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2023\/11\/Czym_jest_monkey_patching_w_Pythonie-1024x536.png","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#articleImage"},"datePublished":"2023-11-17T12:07:24+05:30","dateModified":"2023-12-05T16:50:29+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#webpage"},"articleSection":"Software development, python"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.xyz\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/software-development\/#listItem","name":"Software development"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/software-development\/#listItem","position":2,"name":"Software development","item":"https:\/\/2thenew.xyz\/blog\/category\/software-development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#listItem","name":"Mocking VS Monkey Patching in Python"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#listItem","position":3,"name":"Mocking VS Monkey Patching in Python","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/software-development\/#listItem","name":"Software development"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.xyz\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.xyz\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.xyz\/blog\/author\/gautam-rishi\/#author","url":"https:\/\/2thenew.xyz\/blog\/author\/gautam-rishi\/","name":"Gautam Rishi","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/e19afca4-f630-42c9-b4fd-f5e366e8183b_Gautam-Rishi-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Gautam Rishi"}},{"@type":"WebPage","@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#webpage","url":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/","name":"Mocking VS Monkey Patching in Python | TO THE NEW Blog","description":"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gautam-rishi\/#author"},"creator":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gautam-rishi\/#author"},"datePublished":"2023-11-17T12:07:24+05:30","dateModified":"2023-12-05T16:50:29+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.xyz\/blog\/#website","url":"https:\/\/2thenew.xyz\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Mocking VS Monkey Patching in Python | TO THE NEW Blog","og:description":"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In","og:url":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/","og:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Mocking VS Monkey Patching in Python | TO THE NEW Blog","twitter:description":"What is Monkey Patching? Monkey patching is a concept python where in we can change the behavior or work of code, module, or class at run time without changing the whole code base. For example in big projects, we have some third-party modules which may or may not be working while you are developing. In","twitter:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"59152","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e065e5cb6f3","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2023-12-05 06:37:24","updated":"2024-02-29 11:09:25","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\/category\/software-development\/\" title=\"Software development\">Software development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMocking VS Monkey Patching in Python\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.xyz\/blog"},{"label":"Software development","link":"https:\/\/2thenew.xyz\/blog\/category\/software-development\/"},{"label":"Mocking VS Monkey Patching in Python","link":"https:\/\/2thenew.xyz\/blog\/mocking-vs-monkey-patching-in-python\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/59152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/users\/1677"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/comments?post=59152"}],"version-history":[{"count":3,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/59152\/revisions"}],"predecessor-version":[{"id":59470,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/59152\/revisions\/59470"}],"wp:attachment":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/media?parent=59152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/categories?post=59152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/tags?post=59152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}