Django snippets: Custom collectstatic that uses etag and md5 digests to determine whether files on S3 have changed - http://djangosnippets.org/snippet...
Python Unit Testing: Injecting Exceptions with Mock and Nose One task you’ll find yourself doing quite a bit in Python is testing exception handling code. There’s two ways to go about testing exception handling code: 1. Create real situations that imitate the problems you’ll encounter when your code is run and assert an exception is raised. 2. Inject an exception using mock.
- Siddharth Mitra