I hereby claim:
- I am ryankask on github.
- I am ryankask (https://keybase.io/ryankask) on keybase.
- I have a public key whose fingerprint is 007B 321A 6B46 2028 CBE3 1446 BDF6 E756 1956 F3CF
To claim this, I am signing this object:
| import http | |
| import io | |
| import typing | |
| from urllib.parse import unquote, urljoin, urlparse | |
| import requests | |
| class _HeaderDict(requests.packages.urllib3._collections.HTTPHeaderDict): | |
| def get_all(self, key, default): |
| """ | |
| SQLAlchemy, PostgreSQL (psycopg2), and autocommit | |
| See blog post: http://oddbird.net/2014/06/14/sqlalchemy-postgres-autocommit/ | |
| """ | |
| from contextlib import contextmanager | |
| from sqlalchemy import create_engine, event | |
| from sqlalchemy.orm import sessionmaker, Session as BaseSession |
I hereby claim:
To claim this, I am signing this object:
| with self.assertNumQueries(6) as captured_queries: | |
| response = self.client.get(self.url, data=data, **self.headers) | |
| for i, query in enumerate(captured_queries.connection.queries): | |
| print '*** QUERY {} ***\n {} \n***'.format(i + 1, query['sql']) |
| #include <Python.h> | |
| #include <curl/curl.h> | |
| typedef struct Bucket { | |
| char *contents; | |
| size_t size; | |
| } Bucket; | |
| static PyObject *CurlyError; |
| diff --git a/tests/core/tests/field_urls.py b/tests/core/tests/field_urls.py | |
| index 2cf34b3..1eb0580 100644 | |
| --- a/tests/core/tests/field_urls.py | |
| +++ b/tests/core/tests/field_urls.py | |
| @@ -14,7 +14,7 @@ class SubjectResource(ModelResource): | |
| class CustomNoteResource(ModelResource): | |
| author = fields.ForeignKey(UserResource, 'author') | |
| subjects = fields.ManyToManyField(SubjectResource, 'subjects') | |
| - | |
| + |
| diff -r 4aebd54035c8 threaded_multihost/test_app/model_tests/tests.py | |
| --- a/threaded_multihost/test_app/model_tests/tests.py Sun Mar 06 16:02:00 2011 -0600 | |
| +++ b/threaded_multihost/test_app/model_tests/tests.py Sat May 21 16:07:46 2011 +0100 | |
| @@ -101,3 +101,23 @@ | |
| # but never RuntimeError: "maximum recursion depth exceeded in cmp" | |
| self.assertEqual(by_host('nonsense.com').domain, 'example.com') | |
| self.assertEqual(by_host('www.nonsense.com').domain, 'example.com') | |
| + | |
| +from django.test import TestCase | |
| + |