~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/tests/test_fixture.py

Merged pgbouncer-fixture-noca into branch-rewrite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
        self.assert_(self.is_db_available())
182
182
 
183
183
        with PGBouncerFixture() as pgbouncer:
184
 
            self.assert_(self.is_db_available())
 
184
            self.assertTrue(self.is_db_available())
185
185
 
186
186
            pgbouncer.stop()
187
 
            self.assert_(not self.is_db_available())
 
187
            self.assertFalse(self.is_db_available())
188
188
 
189
189
        # This confirms that we are again connecting directly to the
190
190
        # database, as the pgbouncer process was shutdown.
191
 
        self.assert_(self.is_db_available())
 
191
        self.assertTrue(self.is_db_available())
192
192
 
193
193
    def test_install_fixture_with_restart(self):
194
194
        self.assert_(self.is_db_available())
195
195
 
196
196
        with PGBouncerFixture() as pgbouncer:
197
 
            self.assert_(self.is_db_available())
 
197
            self.assertTrue(self.is_db_available())
198
198
 
199
199
            pgbouncer.stop()
200
 
            self.assert_(not self.is_db_available())
 
200
            self.assertFalse(self.is_db_available())
201
201
 
202
202
            pgbouncer.start()
203
 
            self.assert_(self.is_db_available())
 
203
            self.assertTrue(self.is_db_available())
204
204
 
205
205
        # Note that because pgbouncer was left running, we can't confirm
206
206
        # that we are now connecting directly to the database.
207
 
        self.assert_(self.is_db_available())
 
207
        self.assertTrue(self.is_db_available())