Skip to content

Commit a33645e

Browse files
authored
Merge pull request #646 from caphrim007/bugfix-complete-coverage-for-sys-config
Completes coverage tests for sys/config
2 parents 260a307 + c3b7c90 commit a33645e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

f5/bigip/tm/sys/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"""
2828
from f5.bigip.mixins import CommandExecutionMixin
2929
from f5.bigip.resource import UnnamedResource
30+
from f5.sdk_exception import UnsupportedMethod
3031

3132

3233
class 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
)

test/functional/tm/sys/test_config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@
1313
# limitations under the License.
1414
#
1515

16+
from f5.sdk_exception import UnsupportedMethod
17+
18+
import pytest
19+
1620

1721
class 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

0 commit comments

Comments
 (0)