File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727"""
2828from f5 .bigip .mixins import CommandExecutionMixin
2929from f5 .bigip .resource import UnnamedResource
30+ from f5 .sdk_exception import UnsupportedMethod
3031
3132
3233class Config (UnnamedResource ,
@@ -43,6 +44,6 @@ def update(self, **kwargs):
4344
4445 :raises: UnsupportedOperation
4546 '''
46- raise self . UnsupportedMethod (
47+ raise UnsupportedMethod (
4748 "%s does not support the update method" % self .__class__ .__name__
4849 )
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414#
1515
16+ from f5 .sdk_exception import UnsupportedMethod
17+
18+ import pytest
19+
1620
1721class TestConfig (object ):
1822 def test_save (self , bigip ):
1923 c = bigip .sys .config
2024 c .exec_cmd ('save' )
25+
26+ def test_update (selfself , mgmt_root ):
27+ with pytest .raises (UnsupportedMethod ) as ex :
28+ mgmt_root .tm .sys .config .update (foo = "bar" )
29+ assert 'does not support the update method' in ex .value .message
You can’t perform that action at this time.
0 commit comments