Skip to content

Instantly share code, notes, and snippets.

/home/piotr/projects/kotti_content_proxy/env/bin/python /home/piotr/apps/pycharm-4.5.3/helpers/pycharm/pytestrunner.py -p pytest_teamcity kotti_content_proxy/tests
Testing started at 1:30 PM ...
============================= test session starts ==============================
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
rootdir: /home/piotr/projects/kotti_content_proxy, inifile: setup.cfg
plugins: Kotti-1.2.0, xdist-1.13.1, pep8-1.0.6, cov-2.1.0, pycharm-0.3.0
collected 13 items
kotti_content_proxy/__init__.py .
kotti_content_proxy/resources.py F
(env)[piotr@demon kotti_content_proxy]$ pip list
alembic (0.8.2)
apipkg (1.4)
appdirs (1.4.0)
Babel (2.1.1)
Beaker (1.7.0)
beautifulsoup4 (4.4.1)
bleach (1.4.2)
bleach-whitelist (0.0.7)
Chameleon (2.22)
import logging
from os import remove
from sqlalchemy import (create_engine, Column, ForeignKey, Integer, String, Unicode)
from sqlalchemy.ext.declarative import (declarative_base, declared_attr)
from sqlalchemy.orm import (configure_mappers, sessionmaker)
from sqlalchemy.util import classproperty
from sqlalchemy_continuum import make_versioned
logging.basicConfig()
@piotr-dobrogost
piotr-dobrogost / sa-continnum.test failures.txt
Last active September 3, 2015 12:41
First 10 failures when running tests of SQLAlchemy-Continuum 1.2.0
(env)[piotr@demon sqlalchemy-continuum]$ py.test --maxfail=10 tests
==================================================================================== test session starts ====================================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/piotr/projects/sqlalchemy-continuum, inifile:
collected 627 items
tests/test_accessors.py ................................................................................................................
tests/test_changeset.py .........
tests/test_column_aliases.py ........................s
tests/test_column_inclusion_and_exclusion.py ......
@piotr-dobrogost
piotr-dobrogost / resources.py
Last active September 2, 2015 12:13
Error when trying to version Node table in Kotti using SQLAlchemy-Continuum
diff --git a/kotti/resources.py b/kotti/resources.py
index e771ebe..3723732 100644
--- a/kotti/resources.py
+++ b/kotti/resources.py
@@ -69,6 +69,11 @@ from kotti.util import Link
from kotti.util import LinkParent
from kotti.util import LinkRenderer
+from sqlalchemy_continuum import make_versioned
+
from http.server import SimpleHTTPRequestHandler
from http.server import HTTPServer
class MyRequestHandler(SimpleHTTPRequestHandler):
#protocol_version = "HTTP/1.0" # works
protocol_version = "HTTP/1.1" # hangs
def __init__(self, request, *args):
request.settimeout(3)
import sys
from requests import request
from requests import async
URL = 'http://httpbin.org/get'
def get():
return request('get', URL)
def async_get():
from gevent import monkey
monkey.patch_all()
import gevent
import requests
def http_req(x, url):
r = requests.post(url)
print "Request ", x, r