~ubuntu-branches/ubuntu/lucid/desktopcouch/lucid

« back to all changes in this revision

Viewing changes to desktopcouch/tests/test_start_local_couchdb.py

  • Committer: Elliot Murphy
  • Date: 2010-03-01 17:18:07 UTC
  • mfrom: (1.5.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: elliot@elliotmurphy.com-20100301171807-fb8hzyzfbgcuig2j
* New upstream bugfix release.
  - Include a new program bin/desktopcouch-get-port .
  - Use DBus to get port, and thereby start the service daemon, on normal
    Python access to the database. (LP: #519444)
  - Update docs to be explicit about put_record(r) mutating r .
  - Add new method put_records_batch(iterable_of_records) .
  - Fix up apport collection.
  - Fix a problem with couchdb mutating its INI file to store a hashed
    password, which is useless for HTTP Basic auth in the bookmark file.
  - Fix obscure bugs in couchdb startup regarding port availability.
  - Update execute_view() ti take a dict of additional parameters for
    execution.
  - Add has_key() method to desktopcouch.record.RecordDict so that it
    behaves more like a dictionary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
    def setUp(self):
73
73
        # create temp folder with databases and design documents in
 
74
        super(TestUpdateDesignDocuments, self).setUp()
74
75
        xdg_data = os.path.split(test_environment.test_context.db_dir)[0]
75
76
        try:
76
77
            os.mkdir(os.path.join(xdg_data, "desktop-couch"))
92
93
 
93
94
        # databases that should be created
94
95
        couchdb("cfg", create=True, ctx=test_environment.test_context)
95
 
        couchdb("cfg_and_empty_design", create=True, ctx=test_environment.test_context)
96
 
        couchdb("cfg_and_design_no_views", create=True, ctx=test_environment.test_context)
97
 
        couchdb("cfg_and_design_one_view_no_map", create=True, ctx=test_environment.test_context)
98
 
        couchdb("cfg_and_design_one_view_map_no_reduce", create=True, ctx=test_environment.test_context)
 
96
        couchdb(
 
97
            "cfg_and_empty_design", create=True,
 
98
            ctx=test_environment.test_context)
 
99
        couchdb(
 
100
            "cfg_and_design_no_views", create=True,
 
101
            ctx=test_environment.test_context)
 
102
        couchdb(
 
103
            "cfg_and_design_one_view_no_map", create=True,
 
104
            ctx=test_environment.test_context)
 
105
        couchdb(
 
106
            "cfg_and_design_one_view_map_no_reduce", create=True,
 
107
            ctx=test_environment.test_context)
99
108
 
100
109
        dbmock1 = mocker.mock()
101
110
        mocker.result(dbmock1)
102
111
        dbmock1.add_view("view1", "cfg_and_design_one_view_map_no_reduce:map",
103
112
          None, "doc1")
104
 
        couchdb("cfg_and_design_one_view_map_reduce", create=True, ctx=test_environment.test_context)
 
113
        couchdb(
 
114
            "cfg_and_design_one_view_map_reduce", create=True,
 
115
            ctx=test_environment.test_context)
105
116
        dbmock2 = mocker.mock()
106
117
        mocker.result(dbmock2)
107
118
        dbmock2.add_view("view1", "cfg_and_design_one_view_map_reduce:map",
108
119
          "cfg_and_design_one_view_map_reduce:reduce", "doc1")
109
 
        couchdb("cfg_and_design_two_views_map_reduce", create=True, ctx=test_environment.test_context)
 
120
        couchdb(
 
121
            "cfg_and_design_two_views_map_reduce", create=True,
 
122
            ctx=test_environment.test_context)
110
123
        dbmock3 = mocker.mock()
111
124
        mocker.result(dbmock3)
112
125
        dbmock3.add_view("view1", "cfg_and_design_two_views_map_reduce:map1",