This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wsgiref.simple_server import make_server | |
from zope.interface import ( | |
Interface, | |
alsoProvides, | |
) | |
from pyramid.config import Configurator | |
from pyramid.httpexceptions import HTTPFound | |
from pyramid.response import Response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sameroute.py | |
from wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid.response import Response | |
def hello_world(request): | |
return Response('Hello %(name)s!' % request.matchdict) | |
if __name__ == '__main__': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- day 1 -- | |
The Cynical Introduction | |
All Code Is Terrible | |
Avoid Shame, Test Everything | |
Proving It Works Isn't The Goal | |
But It Makes Me So Slow!? | |
Don't Be Afraid to Throw It Away |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cars.com Python Testing Training | |
-- day 1 -- | |
The Cynical Introduction | |
All Code Is Terrible | |
Avoid Shame, Test Everything | |
Proving It Works Isn't The Goal | |
But It Makes Me So Slow!? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All Code Is Terrible | |
--------------------- | |
- All code is terrible. | |
- There is no shame in writing terrible code. | |
- There is only shame in having more code than is strictly necessary for a | |
purpose. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName bokehtest.agendaless.com | |
ErrorLog /var/log/apache2/bokeh-error.log | |
CustomLog /var/log/apache2/bokeh-access.log combined | |
RewriteEngine On | |
RewriteRule ^/(.*) http://127.0.0.1:5006/$1 [L,P] | |
ProxyPreserveHost On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_____________________________ test_watch_document ______________________________ | |
client = <google.cloud.firestore_v1beta1.client.Client object at 0x7f5b1b24ca90> | |
cleanup = <built-in method append of list object at 0x7f5b18983d88> | |
def test_watch_document(client, cleanup): | |
db = client | |
doc_ref = db.collection(u'users').document( | |
u'alovelace' + unique_resource_id()) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid import httpexceptions | |
def nocontent(request): | |
return httpexceptions.HTTPNoContent() | |
if __name__ == '__main__': | |
config = Configurator() | |
config.add_view(nocontent, route_name='nocontent') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=================================== FAILURES =================================== | |
_________ TestWatch.test__compute_snapshot_operation_relative_ordering _________ | |
self = <tests.unit.test_watch.TestWatch testMethod=test__compute_snapshot_operation_relative_ordering> | |
def test__compute_snapshot_operation_relative_ordering(self): | |
from google.cloud.firestore_v1beta1.watch import WatchDocTree | |
doc_tree = WatchDocTree() | |
class DummyDoc(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/firestore/google/cloud/firestore_v1beta1/watch.py b/firestore/google/cloud/firestore_v1beta1/watch.py | |
index bc2b237bc1..a11313d6c3 100644 | |
--- a/firestore/google/cloud/firestore_v1beta1/watch.py | |
+++ b/firestore/google/cloud/firestore_v1beta1/watch.py | |
@@ -619,10 +619,10 @@ class Watch(object): | |
assert name in updated_map, 'Document to delete does not exist' | |
old_document = updated_map.get(name) | |
# XXX probably should not expose IndexError when doc doesnt exist | |
- existing = updated_tree.find(old_document) | |
+ existing = updated_tree.find(name) |