Effective Mock Configuration for Python Unit Testing
Learn how to precisely configure mock objects using Python's standard library to isolate dependencies and ensure robust, repeatable unit tests for your applications.
-
💬
مدرب ذكاء اصطناعي
اسأل عن أي درس واحصل على إجابة واضحة فورًا، في أي وقت. -
🕐
ابدأ في أي وقت
بلا جداول أو مواعيد نهائية — تعلّم بوتيرتك، وقتما يناسبك. -
🌐
بالعربية
الدروس والمهام والشهادة — كل ذلك بلغتك بالكامل.
حول هذه الدورة
Writing unit tests often means dealing with external dependencies like databases, networks, or APIs, which can make tests slow and unreliable. This course teaches you the fundamental skill of mocking, allowing you to substitute real dependencies with controlled objects, drastically improving test speed, isolation, and reliability.
What you'll learn:
* Understand the core concepts of mocking, patching, and test doubles in Python testing.
* Configure Mock and MagicMock objects to control return values and simulate dynamic side effects.
* Apply patching techniques to replace functions, classes, and attributes within tested modules.
* Practice asserting how mock objects were called to verify specific interaction patterns in your code.
* Learn best practices for structuring test suites and using type hinting to improve mock clarity and maintainability.
The course begins with foundational definitions of unit testing and mocking principles, then moves through practical, text-based examples demonstrating how to set up and configure various mock scenarios using the built-in standard library tools. This course is designed for beginner Python developers and programmers looking to establish a solid foundation in modern unit testing practices. No prior experience with testing frameworks is required.
Start mastering dependency isolation today to write higher-quality code.
ما الذي ستحصل عليه
-
📜
شهادة إتمام
أضفها إلى ملفك على LinkedIn -
💬
مدرّس AI شخصي
عالق في دورة؟ اسأل مدرّسك المدمج أي شيء، في أي وقت. -
🎧
النسخة الصوتية مضمَّنة
تعلَّم أثناء تنقُّلك — دون شاشة -
♾️
وصول مدى الحياة
عُد متى شئت، بلا انتهاء -
📱
الهاتف أو الكمبيوتر
يعمل في أي مكان وعلى أي جهاز -
💸
استرداد خلال 14 يومًا
دون أسئلة -
⚡
قصير ومركَّز
2 ساعة 48 دقيقة من المحتوى التطبيقي
المراجعات
لا توجد مراجعات بعد — كن أول من يشارك تجربته.
الأسئلة الشائعة
ما الذي أحتاجه لأخذ هذه الدورة؟ +
يكفي هاتف أو كمبيوتر متصل بالإنترنت. بدون تثبيتات أو أجهزة خاصة.
كيف يمكنني الدفع؟ +
بالبطاقة عبر Stripe. لا نخزن بيانات البطاقة — يتولى Stripe ذلك بأمان.
هل يمكنني استرداد المال؟ +
نعم — استرداد كامل خلال 14 يومًا، دون أسئلة.
إلى متى يستمر وصولي؟ +
إلى الأبد. بمجرد الشراء، الدورة لك تعود إليها متى شئت.
هل سأحصل على شهادة؟ +
نعم. عند الإتمام ستحصل على شهادة يمكنك إضافتها إلى ملفك في LinkedIn.
مصمَّم للعاملين في
التقنية
التصميم
المالية
التسويق
الرعاية الصحية
التعليم
الضيافة
التصنيع
×2
اشحن مرة واحدة وادفع النصف
أضف Rp 1.580.000 واحصل على 200 رصيد، بحيث تكلف كل دورة حوالي Rp 197.500,00. لا تنتهي صلاحية الأرصدة أبداً.
Rp 1.580.000
200 رصيد
Rp 197.500,00 / دورة
أفضل قيمة
Rp 3.960.000
550 رصيد
Rp 180.000,00 / دورة
Rp 7.920.000
1200 رصيد
Rp 165.000,00 / دورة
الرصيد يصلح لأي دورة ولا ينتهي.