У нас вы можете посмотреть бесплатно How To Write Unit Tests For Existing Python Code // Part 2 of 2 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. This video is part 2 of covering a practical example of adding unit tests to existing code. In the first part, I added tests while not changing the original code. In this part, I show you how refactoring the code makes testing it way easier while improving the design at the same time. I also share a few tips on how to write better unit tests. Part 1 of this series: • How To Write Unit Tests For Existing Pytho... . The code I worked on in this episode is available here: https://github.com/ArjanCodes/2022-te.... 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/ 🔖 Chapters: 0:00 Intro 0:44 Recap and analysis 1:58 Add dependency injection to pay_order 3:50 Creating a payment processor mock 6:11 Removing input patching 9:24 Using a fixture for the credit card 11:43 Removing hardcoded dates from the unit tests 12:50 Turning luhn_checksum into a function 14:00 Removing the hardcoded API key from the unit tests 15:44 Final thoughts #arjancodes #softwaredesign #python