Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion f5/bigip/tm/sys/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"""
from f5.bigip.mixins import CommandExecutionMixin
from f5.bigip.resource import UnnamedResource
from f5.sdk_exception import UnsupportedMethod


class Config(UnnamedResource,
Expand All @@ -43,6 +44,6 @@ def update(self, **kwargs):

:raises: UnsupportedOperation
'''
raise self.UnsupportedMethod(
raise UnsupportedMethod(
"%s does not support the update method" % self.__class__.__name__
)
9 changes: 9 additions & 0 deletions test/functional/tm/sys/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@
# limitations under the License.
#

from f5.sdk_exception import UnsupportedMethod

import pytest


class TestConfig(object):
def test_save(self, bigip):
c = bigip.sys.config
c.exec_cmd('save')

def test_update(selfself, mgmt_root):
with pytest.raises(UnsupportedMethod) as ex:
mgmt_root.tm.sys.config.update(foo="bar")
assert 'does not support the update method' in ex.value.message