File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
lambdas/shared/tests/test_common Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 2929 run : pip install semver
3030
3131 - name : Set SPEC_VERSION env var
32- run : echo ::set-env name=SPEC_VERSION::$(python utilities/scripts/calculate_version.py)
33- env :
34- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
32+ run : echo "SPEC_VERSION::$(python utilities/scripts/calculate_version.py)" >> $GITHUB_ENV
3533
3634 - name : Create release (master only)
3735 id : create-release
Original file line number Diff line number Diff line change @@ -128,6 +128,16 @@ def test_errors_unhandled_response_error(self):
128128 self .assertEqual (issue .get ("code" ), errors .Code .exception )
129129 self .assertEqual (issue .get ("diagnostics" ), f"{ test_message } \n { test_response } " )
130130
131+ def test_errors_api_validation_error (self ):
132+ """Test base ApiValidationError class cannot be used"""
133+ with self .assertRaises (errors .ApiValidationError ) as initial_error :
134+ raise errors .ApiValidationError ()
135+
136+ with self .assertRaises (NotImplementedError ) as not_implemented_error :
137+ initial_error .exception .to_operation_outcome ()
138+
139+ self .assertEqual (str (not_implemented_error .exception ), "Improper usage: base class" )
140+
131141 def test_errors_custom_validation_error (self ):
132142 """Test correct operation of CustomValidationError"""
133143 test_message = "test_message"
You can’t perform that action at this time.
0 commit comments