Skip to content

Commit 792cb54

Browse files
committed
Use new CouchDB default port in test suite.
--HG-- extra : convert_revision : svn%3A7a298fb0-333a-0410-83e7-658617cd9cf3/trunk%4054
1 parent e97c153 commit 792cb54

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

couchdb/client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"""Python client API for CouchDB.
1010
11-
>>> server = Server('http://localhost:8888/')
11+
>>> server = Server('http://localhost:5984/')
1212
>>> db = server.create('python-tests')
1313
>>> doc_id = db.create({'type': 'Person', 'name': 'John Doe'})
1414
>>> doc = db[doc_id]
@@ -54,7 +54,7 @@ class ServerError(Exception):
5454
class Server(object):
5555
"""Representation of a CouchDB server.
5656
57-
>>> server = Server('http://localhost:8888/')
57+
>>> server = Server('http://localhost:5984/')
5858
5959
This class behaves like a dictionary of databases. For example, to get a
6060
list of database names on the server, you can simply iterate over the
@@ -82,7 +82,7 @@ def __init__(self, uri):
8282
"""Initialize the server object.
8383
8484
:param uri: the URI of the server (for example
85-
``http://localhost:8888/``)
85+
``http://localhost:5984/``)
8686
"""
8787
self.resource = Resource(httplib2.Http(), uri)
8888

@@ -156,7 +156,7 @@ def create(self, name):
156156
class Database(object):
157157
"""Representation of a database on a CouchDB server.
158158
159-
>>> server = Server('http://localhost:8888/')
159+
>>> server = Server('http://localhost:5984/')
160160
>>> db = server.create('python-tests')
161161
162162
New documents can be added to the database using the `create()` method:
@@ -294,7 +294,7 @@ def get(self, id, default=None, **options):
294294
def query(self, code, content_type='text/javascript', **options):
295295
"""Execute an ad-hoc query (a "temp view") against the database.
296296
297-
>>> server = Server('http://localhost:8888/')
297+
>>> server = Server('http://localhost:5984/')
298298
>>> db = server.create('python-tests')
299299
>>> db['johndoe'] = dict(type='Person', name='John Doe')
300300
>>> db['maryjane'] = dict(type='Person', name='Mary Jane')
@@ -341,7 +341,7 @@ def update(self, documents):
341341
"""Perform a bulk update or insertion of the given documents using a
342342
single HTTP request.
343343
344-
>>> server = Server('http://localhost:8888/')
344+
>>> server = Server('http://localhost:5984/')
345345
>>> db = server.create('python-tests')
346346
>>> for doc in db.update([
347347
... Document(type='Person', name='John Doe'),
@@ -372,7 +372,7 @@ def update(self, documents):
372372
def view(self, name, **options):
373373
"""Execute a predefined view.
374374
375-
>>> server = Server('http://localhost:8888/')
375+
>>> server = Server('http://localhost:5984/')
376376
>>> db = server.create('python-tests')
377377
>>> db['gotham'] = dict(type='City', name='Gotham City')
378378

couchdb/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""Mapping from raw JSON data structures to Python objects and vice versa.
1010
1111
>>> from couchdb import Server
12-
>>> server = Server('http://localhost:8888/')
12+
>>> server = Server('http://localhost:5984/')
1313
>>> db = server.create('python-tests')
1414
1515
To define a document schema, you declare a Python class inherited from
@@ -343,7 +343,7 @@ class DictField(Field):
343343
"""Field type for nested dictionaries.
344344
345345
>>> from couchdb import Server
346-
>>> server = Server('http://localhost:8888/')
346+
>>> server = Server('http://localhost:5984/')
347347
>>> db = server.create('python-tests')
348348
349349
>>> class Post(Document):
@@ -383,7 +383,7 @@ class ListField(Field):
383383
"""Field type for sequences of other fields.
384384
385385
>>> from couchdb import Server
386-
>>> server = Server('http://localhost:8888/')
386+
>>> server = Server('http://localhost:5984/')
387387
>>> db = server.create('python-tests')
388388
389389
>>> class Post(Document):

couchdb/tests/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class DatabaseTestCase(unittest.TestCase):
1717

1818
def setUp(self):
19-
uri = os.environ.get('COUCHDB_URI', 'http://localhost:8888/')
19+
uri = os.environ.get('COUCHDB_URI', 'http://localhost:5984/')
2020
self.server = client.Server(uri)
2121
if 'python-tests' in self.server:
2222
del self.server['python-tests']

couchdb/tests/couch_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CouchTests(unittest.TestCase):
1616

1717
def setUp(self):
18-
uri = os.environ.get('COUCHDB_URI', 'http://localhost:8888/')
18+
uri = os.environ.get('COUCHDB_URI', 'http://localhost:5984/')
1919
self.server = Server(uri)
2020
if 'python-tests' in self.server:
2121
del self.server['python-tests']

0 commit comments

Comments
 (0)