更多好资料可以关注我哦
Book Details
- Title: Test-Driven Development with Python
- Author: Harry J. W. Percival
- Length: 480 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2014-06-29
- ISBN-10: 1449364829
Editorial Reviews
By taking you through the development of areal web application from beginning to end, this hands-on guide demonstratesthe practical advantages of test-driven development (TDD) with Python. You’lllearn how to write and run tests before building each part of your app, andthen develop the minimum amount of code required to pass those tests. Theresult? Clean code that works.
In the process, you’ll learn the basics ofDjango, Selenium, Git, jQuery, and Mock, along with current web developmenttechniques. If you’re ready to take your Python skills to the next level, thisbook clearly demonstrates how TDD encourages simple designs and inspiresconfidence.
Dive into the TDD workflow, including theunit test/code cycle and refactoring
Use unit tests for classes and functions,and functional tests for user interactions within the browser
Learn when and how to use mock objects, andthe pros and cons of isolated vs. integrated tests
Test and automate your deployments with astaging server
Apply tests to the third-party plugins youintegrate into your site
Use a Continuous Integration environment torun your tests automatically
Table of Contents
- Part I. The Basics of TDD and Django
- Chapter 1. Getting Django Set Up Using aFunctional Test
- Chapter 2. Extending Our Functional TestUsing the unittest Module
- Chapter 3. Testing a Simple Home Page withUnit Tests
- Chapter 4. What Are We Doing with All TheseTests?
- Chapter 5. Saving User Input
- Chapter 6. Getting to the Minimum ViableSite
- Part II. Web Development Sine Qua Nons
- Chapter 7. Prettification: Layout andStyling, and What to Test About It
- Chapter 8. Testing Deployment Using aStaging Site
- Chapter 9. Automating Deployment withFabric
- Chapter 10. Input Validation and TestOrganisation
- Chapter 11. A Simple Form
- Chapter 12. More Advanced Forms
- Chapter 13. Dipping Our Toes, VeryTentatively, into JavaScript
- Chapter 14. Deploying Our New Code
- Part III. More Advanced Topics
- Chapter 15. User Authentication,Integrating Third-Party Plugins, and Mocking with JavaScript
- Chapter 16. Server-Side Authentication andMocking in Python
- Chapter 17. Test Fixtures, Logging, andServer-Side Debugging
- Chapter 18. Finishing “My Lists”:Outside-In TDD
- Chapter 19. Test Isolation, and “Listeningto Your Tests”
- Chapter 20. Continuous Integration (CI)
- Chapter 21. The Token Social Bit, the PagePattern, and an Exercise for the Reader
- Chapter 22. Fast Tests, Slow Tests, and HotLava
- Appendix A. PythonAnywhere
- Appendix B. Django Class-Based Views
- Appendix C. Provisioning with Ansible
- Appendix D. Testing Database Migrations
- Appendix E. What to Do Next
- Appendix F. Cheat Sheet
- Appendix G. Bibliography