Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(2) | Call(2) | Derive(0) | Import(0)
src/c/h/chieftain-HEAD/board/management/commands/rebuild_cache.py chieftain(Download)
def handle(self, *args, **options): """Rebuild the cache.""" shutil.rmtree("cache", ignore_errors=True) for obj in chain(Thread.objects.all(), Post.objects.all()): obj.save()
src/c/h/chieftain-HEAD/api1/tests.py chieftain(Download)
assert response.status_code == 201, response.status_code # Assuming the currently created post is the only one in the database. posts = Post.objects.all() assert posts.count() == 1, "try to reset the db first" # This post object should contain exactly same values