Skip to content

Commit

Permalink
CADC-10021 - status method change. (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
SharonGoliath authored Sep 7, 2021
1 parent 9fd62f1 commit 9a1476b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vos/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ edit_on_github = False
github_project = opencadc/vostools
install_requires = html2text>=2016.5.29 cadcutils>=1.2.1 future aenum
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
version = 3.3.2
version = 3.3.3


[entry_points]
Expand Down
9 changes: 9 additions & 0 deletions vos/vos/tests/test_vos.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Object(object):
pass


@patch('vos.vos.net.ws.WsCapabilities.get_access_url',
Mock(return_value='http://foo.com/vospace'))
def test_get_node_url():
client = Client()
with pytest.raises(TypeError):
Expand Down Expand Up @@ -783,6 +785,13 @@ def test_mkdir(self):
'http://www.canfar.phys.uvic.ca/vospace/nodes/bar',
headers=headers, data=str(node))

@patch('vos.vos.net.ws.WsCapabilities.get_access_url',
Mock(return_value='http://foo.com/vospace'))
def test_success_failure_case(self):
with pytest.raises(OSError):
client = Client()
ignore = client.status('vos:test/node.fits', code='abc')


class TestNode(unittest.TestCase):
"""Test the vos Node class.
Expand Down
2 changes: 1 addition & 1 deletion vos/vos/vos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2826,7 +2826,7 @@ def status(self, uri, code=None):
status on.
:param code: NOT SUPPORTED.
"""
if not code:
if code:
raise OSError(errno.ENOSYS,
"Use of 'code' option values no longer supported.")
self.get_node(uri)
Expand Down

0 comments on commit 9a1476b

Please sign in to comment.