I hereby claim:
- I am jphalip on github.
- I am julienphalip (https://keybase.io/julienphalip) on keybase.
- I have a public key whose fingerprint is 2D00 16F9 CC71 853B 0A39 70A5 41F0 C351 4608 56BC
To claim this, I am signing this object:
| from locust import HttpLocust, TaskSet, task | |
| from locust import events | |
| class UserBehavior(TaskSet): | |
| @task | |
| def google(self): | |
| self.client.get("/") |
| from django.test import TestCase | |
| from django_webtest import WebTest | |
| """ | |
| WebTest rocks. You should check it out: | |
| http://webtest.readthedocs.org/en/latest/ | |
| https://pypi.python.org/pypi/django-webtest | |
| """ | |
I hereby claim:
To claim this, I am signing this object:
| diff --git a/restless/dj.py b/restless/dj.py | |
| index 9af449d..d963699 100644 | |
| --- a/restless/dj.py | |
| +++ b/restless/dj.py | |
| @@ -6,7 +6,7 @@ from django.core.exceptions import ObjectDoesNotExist | |
| from django.http import HttpResponse | |
| from django.views.decorators.csrf import csrf_exempt | |
| -from .exceptions import NotFound | |
| +from .exceptions import NotFound, Unauthorized |
| #!/usr/bin/env python | |
| import argparse | |
| import re | |
| import os | |
| import subprocess | |
| try: | |
| import json | |
| except ImportError: | |
| import simplejson as json |
| # Author: Julien Phalip | |
| # License: BSD | |
| # Description: Change the current directory to the path of the given Python package. | |
| function goto { | |
| cd `python -c "import pkgutil; print(pkgutil.get_loader('$1').filename)"` | |
| } | |
| function _top_level_packages { | |
| python -c "import pkgutil; print('\n'.join([name for loader, name, ispkg in sorted(pkgutil.iter_modules()) if ispkg]))" |
| %w{libjpeg-dev libfreetype6-dev}.each do |pkg| | |
| package pkg do | |
| action :install | |
| end | |
| end | |
| bash "Install PIL from source" do | |
| user vagrant | |
| group vagrant | |
| code <<-EOH |
| diff --git a/django/views/debug.py b/django/views/debug.py | |
| index 7bdf0d2..d95cd62 100644 | |
| --- a/django/views/debug.py | |
| +++ b/django/views/debug.py | |
| @@ -155,9 +155,20 @@ class SafeExceptionReporterFilter(ExceptionReporterFilter): | |
| Replaces the values of variables marked as sensitive with | |
| stars (*********). | |
| """ | |
| - func_name = tb_frame.f_code.co_name | |
| - func = tb_frame.f_globals.get(func_name) |
| ------------------------------------------------------------------------ | |
| zip-test.py: | |
| import zipfile | |
| zf = zipfile.ZipFile('django-compressor-1.1.2.pybundle', 'r') | |
| zf.debug=3 | |
| ------------------------------------------------------------------------ | |
| $ python zip-test.py |
| class AdminInlinesSeleniumTests(SeleniumTestCase): | |
| fixtures = ['admin-views-users.xml'] | |
| urls = "regressiontests.admin_inlines.urls" | |
| def admin_login(self, username, password): | |
| """ | |
| Helper function to log into the admin. | |
| """ | |
| self.selenium.open('/admin/') | |
| self.selenium.type('username', username) |