def test_start_with_relationship(self): self.is_relation_made.return_value = True self.service_running.return_value = False hooks.start() self.apply_playbook.assert_called_with(hooks.playbook, tags=['start']) self.status_set.assert_called_with(hooks.status_maintenance, hooks.msg_service_failed_to_start)
def test_start_without_relationship(self): self.is_relation_made.return_value = False hooks.start() self.apply_playbook.assert_not_called() self.status_set.assert_called_with(hooks.status_blocked, hooks.msg_missing_es_rel)
def test_start_runs_service(self): hooks.start() host.service.assert_called_with('restart', 'beaver')
def test_start_does_not_raise(self): hooks.start()
def test_start(self): ceph_hooks.start() cmd = ['service', 'radosgw', 'start'] self.subprocess.call.assert_called_with(cmd)