Skip to content

Instantly share code, notes, and snippets.

View moshez's full-sized avatar

Moshe Zadka moshez

View GitHub Profile
In [18]: from werkzeug.routing import Map, Rule
In [19]: a=Map()
In [20]: b=Rule('/<__rest__>')
In [21]: a.add(b)
In [22]: c=a.bind('foo', path_info='/foo/%0A%0D')
@moshez
moshez / gist:6513b2f55211defcf9f4
Created March 20, 2015 03:10
Patch for thing
(env)moshez@mcgyver:~/src/ncolony$ git diff -r 196c8dd
diff --git a/ncolony/tests/test_ctllib.py b/ncolony/tests/test_ctllib.py
index 5ff4514..b9a24cf 100644
--- a/ncolony/tests/test_ctllib.py
+++ b/ncolony/tests/test_ctllib.py
@@ -70,6 +70,16 @@ class TestArgParsing(unittest.TestCase):
self.assertEquals(res.gid, 6)
self.assertIs(res.func, ctllib.add)
+ def test_port(self):
(env)moshez@mcgyver:~/src/temp$ cat build-cmd
sphinx-build -b html . _build/html
(env)moshez@mcgyver:~/src/temp$ cat index.rst
PROJECT-NAME-HERE
=================
.. toctree::
:maxdepth: 2
(env)moshez@mcgyver:~/src/temp$ cat conf.py
master_doc = 'index'