Esempio n. 1
0
 def test_db_changed_missing_relation_data(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.db_changed()
     self.log.assert_called_with(
         'shared-db relation incomplete. Peer not ready?'
     )
 def test_db_changed_missing_relation_data(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.db_changed()
     self.log.assert_called_with(
         'shared-db relation incomplete. Peer not ready?'
     )
Esempio n. 3
0
 def _shared_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['shared-db']
     configs.write = MagicMock()
     hooks.db_changed()
 def _shared_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['shared-db']
     configs.write = MagicMock()
     hooks.db_changed()