Example #1
0
    def test_parse(self, config):
        """Test parse."""
        obj = ServerlessOptions.parse(**config)

        assert obj.args == config.get('args', [])
        assert obj.extend_serverless_yml == \
            config.get('extend_serverless_yml', {})
        assert obj.promotezip == config.get('promotezip', {})
        assert obj.skip_npm_ci == config.get('skip_npm_ci', False)
Example #2
0
    def test_parse(self, config):
        """Test parse."""
        obj = ServerlessOptions.parse(**config)

        assert obj.args == config.get("args", [])
        assert obj.extend_serverless_yml == config.get("extend_serverless_yml",
                                                       {})
        assert obj.promotezip == config.get("promotezip", {})
        assert obj.skip_npm_ci == config.get("skip_npm_ci", False)
Example #3
0
 def test_parse_invalid_promotezip(self):
     """Test parse with invalid promotezip value."""
     with pytest.raises(ValueError):
         assert not ServerlessOptions.parse(promotezip={'key': 'value'})