def test_postgresql_db_changed_missing_relation_data(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.postgresql_db_changed()
     self.log.assert_called_with(
         'pgsql-db relation incomplete. Peer not ready?'
     )
 def test_postgresql_db_changed_missing_relation_data(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.postgresql_db_changed()
     self.log.assert_called_with(
         'pgsql-db relation incomplete. Peer not ready?'
     )
 def _postgresql_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['pgsql-db']
     configs.write = MagicMock()
     hooks.postgresql_db_changed()
 def _postgresql_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['pgsql-db']
     configs.write = MagicMock()
     hooks.postgresql_db_changed()