ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AviaE <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #146: ARIA-199 Add "services outputs" CLI c...
Date Sun, 04 Jun 2017 13:31:58 GMT
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/146#discussion_r120009913
  
    --- Diff: tests/cli/test_services.py ---
    @@ -174,7 +174,30 @@ def test_delete_available_nodes_error_with_force(self, monkeypatch,
mock_storage
     
     
     class TestServicesOutputs(TestCliBase):
    -    pass
    +
    +    def test_header_string(self, monkeypatch, mock_storage):
    +        monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
    +        self.invoke('services outputs test_s')
    +        assert 'Showing outputs for service test_s...' in self.logger_output_string
    +
    +    def test_outputs_no_outputs(self, monkeypatch, mock_storage):
    +        monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
    +        self.invoke('services outputs service_with_no_outputs')
    +
    +        assert 'No outputs' in self.logger_output_string
    +        assert 'output1' not in self.logger_output_string
    +        assert 'value1' not in self.logger_output_string
    +
    +    def test_outputs_one_output(self, monkeypatch, mock_storage):
    +        monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
    +        s = mock_models.create_service_with_dependencies(include_output=True)
    +        monkeypatch.setattr(mock_storage.service, 'get_by_name', mock.MagicMock(return_value=s))
    +
    +        self.invoke('services outputs test_s')
    +
    +        assert 'output1' in self.logger_output_string
    +        assert 'value1' in self.logger_output_string
    +        assert 'No inputs' not in self.logger_output_string
    --- End diff --
    
    `'No outputs'`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message